Skip to content

Commit

Permalink
Merge pull request #164 from tj-actions/chore/add-helpful-step-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Aug 21, 2022
2 parents 9a84c56 + 6f52001 commit a704b89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ runs:
steps:
- id: branch
run: |
# "Set branch names..."
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
BASE_REF=$(printf "%q" "${{ github.base_ref }}")
HEAD_REF=$(printf "%q" "${{ github.head_ref }}")
Expand All @@ -57,6 +58,7 @@ runs:
shell: bash
- id: current_branch
run: |
# "Set the current branch name..."
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 }}"
Expand All @@ -72,6 +74,7 @@ runs:
shell: bash
- id: default
run: |
# "Set the default branch name..."
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ github.event.repository.default_branch }}" ]]; then
echo "::set-output name=is_default::true"
Expand All @@ -84,6 +87,7 @@ runs:
shell: bash
- id: tag
run: |
# "Set the tag name..."
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
REF=$(printf "%q" "${{ github.ref }}")
TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
Expand Down

0 comments on commit a704b89

Please sign in to comment.