From 46f4cba4a9bda15f63ea06fdcc5f9bf0846b2fb8 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 27 Aug 2022 09:28:16 -0600 Subject: [PATCH] feat: add support for setting the base_ref branch of a tag Fixes: #158 --- action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 773b7e5..8dfe551 100644 --- a/action.yml +++ b/action.yml @@ -54,6 +54,11 @@ runs: REF_BRANCH=${REF_BRANCH/refs\/heads\//} echo "::set-output name=ref_branch::$(eval printf "%s" "$REF_BRANCH")" + else + BASE_REF=$(printf "%q" "${{ github.event.base_ref }}") + BASE_REF=${BASE_REF/refs\/heads\/${{ inputs.strip_tag_prefix }}/} + + echo "::set-output name=base_ref_branch::$(eval printf "%s" "$BASE_REF")" fi shell: bash - id: current_branch @@ -65,11 +70,6 @@ runs: else echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}" fi - else - REF=$(printf "%q" "${{ github.ref }}") - REF_BRANCH=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/} - - echo "::set-output name=current_branch::$(eval printf "%s" "$REF_BRANCH")" fi shell: bash - id: default