mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-11-23 21:03:52 +08:00
Merge branch 'main' into upgrade-to-v6.3
This commit is contained in:
commit
caf6589e51
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@ -41,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' && steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default != 'false'
|
||||
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'
|
||||
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' && steps.branch-name.outputs.is_tag == 'false' && steps.branch-name.outputs.is_default != 'true'
|
||||
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'
|
||||
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' && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.base_ref_branch
|
||||
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
|
||||
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' && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.head_ref_branch
|
||||
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
|
||||
run: |
|
||||
echo "Head ref unset: ${{ steps.branch-name.outputs.head_ref_branch }}"
|
||||
exit 1
|
||||
@ -65,8 +65,8 @@ jobs:
|
||||
run: |
|
||||
echo "Ref unset: ${{ steps.branch-name.outputs.ref_branch }}"
|
||||
exit 1
|
||||
- name: Test current_branch output for pull_request event.
|
||||
if: github.event_name == 'pull_request' && steps.branch-name.outputs.is_tag == 'false' && !steps.branch-name.outputs.current_branch
|
||||
- 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
|
||||
run: |
|
||||
echo "Current branch unset: ${{ steps.branch-name.outputs.current_branch }}"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user