mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-11-23 16:53:50 +08:00
Update action.yml
This commit is contained in:
parent
90379ab59c
commit
520e5aadb3
10
action.yml
10
action.yml
@ -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).'
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user