Update action.yml

This commit is contained in:
Tonye Jack 2021-02-12 16:30:56 -05:00 committed by GitHub
parent 90379ab59c
commit 520e5aadb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,9 @@ inputs:
required: false required: false
outputs: outputs:
is_default:
value: ${{ steps.current_branch.outputs.is_default }}
description: 'Returns "true" if the current branch is the default else "false".'
current_branch: current_branch:
value: ${{ steps.current_branch.outputs.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).' description: 'Returns the value of the current branch which is consistent regardless of event_type: i.e (push, pull_requests).'
@ -50,6 +53,13 @@ runs:
echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}" echo "::set-output name=current_branch::${{ steps.branch.outputs.ref_branch }}"
fi fi
shell: bash 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: branding:
icon: git-branch icon: git-branch