From 7cc8adc4b4eaae6b556522195ba8eea93331767b Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 11 Dec 2020 08:48:51 -0500 Subject: [PATCH] Update test. --- .github/workflows/test.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e79858..af177da 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,13 +23,18 @@ jobs: echo "${{ steps.branch-name.outputs.base_ref_branch }}" echo "${{ steps.branch-name.outputs.head_ref_branch }}" echo "${{ steps.branch-name.outputs.ref_branch }}" -# - name: Test base ref output -# if: steps.branch-name.outputs.base_ref_branch -# run: | -# exit 1 -# - name: Test head ref output -# run: | -# exit 1 -# - name: Test ref output -# run: | -# exit 1 + - name: Test base ref output + if: github.event_name == 'pull_request' && !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.head_ref_branch + run: | + echo "Head ref unset: ${{ steps.branch-name.outputs.head_ref_branch }}" + exit 1 + - name: Test ref output + if: "!steps.branch-name.outputs.ref_branch" + run: | + echo "Ref unset: ${{ steps.branch-name.outputs.ref_branch }}" + exit 1