Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Feb 12, 2021
1 parent 90379ab commit 520e5aa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ inputs:
required: false

outputs:
is_default:
value: ${{ steps.current_branch.outputs.is_default }}
description: 'Returns "true" if the current branch is the default else "false".'
current_branch:
value: ${{ steps.current_branch.outputs.current_branch }}
description: 'Returns the value of the current branch which is consistent regardless of event_type: i.e (push, pull_requests).'
Expand Down Expand Up @@ -50,6 +53,13 @@ runs:
echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}"
fi
shell: bash
- id: is_default
run: |
if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ steps.current_branch.outputs.base_ref_branch }}" ]]; then
echo "::set-output name=is_default::true"
else
echo "::set-output name=is_default::false"
fi
branding:
icon: git-branch
Expand Down

0 comments on commit 520e5aa

Please sign in to comment.