mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-12-27 14:27:59 +08:00
Update test.yml
This commit is contained in:
parent
41584fbfb4
commit
76ea840a9e
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@ -6,7 +6,6 @@ on:
|
||||
- '*'
|
||||
branches:
|
||||
- main
|
||||
pull_request_review:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
branches:
|
||||
@ -42,22 +41,22 @@ jobs:
|
||||
echo "Is Tag: ${{ steps.branch-name.outputs.is_tag }}"
|
||||
echo "Current tag: ${{ steps.branch-name.outputs.tag }}"
|
||||
- name: Test is_default output for pull request
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default != 'false'
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default != 'false'
|
||||
run: |
|
||||
echo "Is default is invalid: ${{ steps.branch-name.outputs.is_default }}"
|
||||
exit 1
|
||||
- name: Test is_default output for non pull request
|
||||
if: github.event_name != 'pull_request' && github.event_name != 'pull_request_target' && steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default != 'true'
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default != 'true'
|
||||
run: |
|
||||
echo "Is default is invalid: ${{ steps.branch-name.outputs.is_default }}"
|
||||
exit 1
|
||||
- name: Test base_ref_branch output
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.base_ref_branch
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.base_ref_branch
|
||||
run: |
|
||||
echo "Base ref unset: ${{ steps.branch-name.outputs.base_ref_branch }}"
|
||||
exit 1
|
||||
- name: Test head_ref output
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.head_ref_branch
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.head_ref_branch
|
||||
run: |
|
||||
echo "Head ref unset: ${{ steps.branch-name.outputs.head_ref_branch }}"
|
||||
exit 1
|
||||
@ -67,7 +66,7 @@ jobs:
|
||||
echo "Ref unset: ${{ steps.branch-name.outputs.ref_branch }}"
|
||||
exit 1
|
||||
- name: Test current_branch output for pull_request or pull_request_target event.
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.current_branch
|
||||
if: contains(github.event_name, 'pull_request') && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.current_branch
|
||||
run: |
|
||||
echo "Current branch unset: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user