mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-12-27 14:27:59 +08:00
parent
4b89c81519
commit
e1eabf0536
@ -14,6 +14,8 @@ outputs:
|
|||||||
is_tag:
|
is_tag:
|
||||||
value: ${{ steps.tag.outputs.is_tag }}
|
value: ${{ steps.tag.outputs.is_tag }}
|
||||||
description: 'Returns "true" if the current branch is a tag else "false".'
|
description: 'Returns "true" if the current branch is a tag else "false".'
|
||||||
|
default_branch:
|
||||||
|
value: ${{ steps.default.outputs.default_branch }}
|
||||||
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).'
|
||||||
@ -72,8 +74,10 @@ runs:
|
|||||||
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
||||||
if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ steps.branch.outputs.ref_branch }}" ]]; then
|
if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ steps.branch.outputs.ref_branch }}" ]]; then
|
||||||
echo "::set-output name=is_default::true"
|
echo "::set-output name=is_default::true"
|
||||||
|
echo "::set-output name=default_branch::${{ github.event.repository.default_branch }}"
|
||||||
else
|
else
|
||||||
echo "::set-output name=is_default::false"
|
echo "::set-output name=is_default::false"
|
||||||
|
echo "::set-output name=default_branch::${{ github.event.repository.default_branch }}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user