diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 356454a..32c0079 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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