From 0960d8622864632b5f0bad85ebdd82c94d6f89e8 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 24 Apr 2021 21:16:05 -0400 Subject: [PATCH] Update action.yml --- action.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 950f6ee..a2833d7 100644 --- a/action.yml +++ b/action.yml @@ -32,7 +32,7 @@ runs: steps: - id: branch run: | - if [[ !${{ startsWith(github.ref, 'refs/tags/') }} ]]; then + if [[ ! "${{ github.ref }}" == "refs/tags/"* ]]; then export BASE_REF=${{ github.base_ref }} export HEAD_REF=${{ github.head_ref }} export REF=${{ github.ref }} @@ -52,15 +52,17 @@ runs: shell: bash - id: default run: | - if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ steps.branch.outputs.ref_branch }}" && !${{ startsWith(github.ref, 'refs/tags/') }} ]]; then - echo "::set-output name=is_default::true" - else - echo "::set-output name=is_default::false" + if [[ ! "${{ github.ref }}" == "refs/tags/"* ]]; then + if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ steps.branch.outputs.ref_branch }}" ]]; then + echo "::set-output name=is_default::true" + else + echo "::set-output name=is_default::false" + fi fi shell: bash - id: tag run: | - if [[ ${{ startsWith(github.ref, 'refs/tags/') }} ]]; then + if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then export REF=${{ github.ref }} TAG=${REF/refs\/tags\${{ inputs.strip_tag_prefix }}//} echo "::set-output name=tag::$TAG"