Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed May 25, 2021
1 parent a9ebb75 commit 653ab74
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,16 @@ runs:
shell: bash
- id: current_branch
run: |
if [[ ${{ github.event_name }} == 'pull_request' && "${{ github.ref }}" != "refs/tags/"* ]]; then
echo "::set-output name=current_branch::${{ steps.branch.outputs.head_ref_branch }}"
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
echo "::set-output name=current_branch::${{ steps.branch.outputs.head_ref_branch }}"
else
echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}"
fi
else
echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}"
REF=${{ github.ref }}
REF_BRANCH=${REF/refs\/tags\//}
echo "::set-output name=current_branch::$REF_BRANCH"
fi
shell: bash
- id: default
Expand All @@ -64,8 +70,6 @@ runs:
run: |
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
REF=${{ github.ref }}
REF_BRANCH=${REF/refs\/tags\//}
echo "::set-output name=current_branch::$REF_BRANCH"
TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
echo "::set-output name=tag::$TAG"
fi
Expand Down

0 comments on commit 653ab74

Please sign in to comment.