From 6ec54a987bbb3a82d14b07a1d2002ed4ca7d5d56 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 13 Feb 2021 05:55:01 -0500 Subject: [PATCH 1/3] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b32ac99..56bc9b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: echo "Base Ref: ${{ steps.branch-name.outputs.base_ref_branch }}" echo "Head Ref: ${{ steps.branch-name.outputs.head_ref_branch }}" echo "Ref: ${{ steps.branch-name.outputs.ref_branch }}" - echo "Is Default: ${{ steps.branch-name.outputs.is_default }}" + echo "Is Default: ${{ steps.branch-name.outputs.is_default }} or $default_branch" - name: Check is_default for pull request if: github.event_name == 'pull_request' && steps.branch-name.outputs.is_default != 'false' run: | From f8e9fb3c6558890c5d4ea2c674e14df8441e3c9d Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 13 Feb 2021 05:57:23 -0500 Subject: [PATCH 2/3] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56bc9b0..b32ac99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: echo "Base Ref: ${{ steps.branch-name.outputs.base_ref_branch }}" echo "Head Ref: ${{ steps.branch-name.outputs.head_ref_branch }}" echo "Ref: ${{ steps.branch-name.outputs.ref_branch }}" - echo "Is Default: ${{ steps.branch-name.outputs.is_default }} or $default_branch" + echo "Is Default: ${{ steps.branch-name.outputs.is_default }}" - name: Check is_default for pull request if: github.event_name == 'pull_request' && steps.branch-name.outputs.is_default != 'false' run: | From 615433a5a25ee5ba844bba10b16df565e96b6eae Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 13 Feb 2021 06:00:28 -0500 Subject: [PATCH 3/3] Update action.yml --- action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 388a455..62ffd50 100644 --- a/action.yml +++ b/action.yml @@ -55,8 +55,10 @@ runs: shell: bash - id: default run: | - if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ steps.current_branch.outputs.base_ref_branch }}" ]]; then - echo "::set-output name=is_default::true" + if [[ -z "${{ steps.branch.outputs.head_ref_branch }}" ]]; then + if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ steps.current_branch.outputs.ref_branch }}" ]]; then + echo "::set-output name=is_default::true" + fi else echo "::set-output name=is_default::false" fi