mirror of
https://github.com/tj-actions/branch-names.git
synced 2024-12-27 14:27:59 +08:00
chore: group step messages
This commit is contained in:
parent
9a84c5671b
commit
75ee062bac
@ -38,6 +38,7 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- id: branch
|
- id: branch
|
||||||
run: |
|
run: |
|
||||||
|
echo "::group::branch"
|
||||||
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
||||||
BASE_REF=$(printf "%q" "${{ github.base_ref }}")
|
BASE_REF=$(printf "%q" "${{ github.base_ref }}")
|
||||||
HEAD_REF=$(printf "%q" "${{ github.head_ref }}")
|
HEAD_REF=$(printf "%q" "${{ github.head_ref }}")
|
||||||
@ -54,9 +55,11 @@ runs:
|
|||||||
|
|
||||||
echo "::set-output name=ref_branch::$(eval printf "%s" "$REF_BRANCH")"
|
echo "::set-output name=ref_branch::$(eval printf "%s" "$REF_BRANCH")"
|
||||||
fi
|
fi
|
||||||
|
echo "::endgroup::"
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: current_branch
|
- id: current_branch
|
||||||
run: |
|
run: |
|
||||||
|
echo "::group::current_branch"
|
||||||
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
||||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
||||||
echo "::set-output name=current_branch::${{ steps.branch.outputs.head_ref_branch }}"
|
echo "::set-output name=current_branch::${{ steps.branch.outputs.head_ref_branch }}"
|
||||||
@ -69,9 +72,11 @@ runs:
|
|||||||
|
|
||||||
echo "::set-output name=current_branch::$(eval printf "%s" "$REF_BRANCH")"
|
echo "::set-output name=current_branch::$(eval printf "%s" "$REF_BRANCH")"
|
||||||
fi
|
fi
|
||||||
|
echo "::endgroup::"
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: default
|
- id: default
|
||||||
run: |
|
run: |
|
||||||
|
echo "::group::default"
|
||||||
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
||||||
if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ github.event.repository.default_branch }}" ]]; then
|
if [[ "${{ steps.current_branch.outputs.current_branch }}" == "${{ github.event.repository.default_branch }}" ]]; then
|
||||||
echo "::set-output name=is_default::true"
|
echo "::set-output name=is_default::true"
|
||||||
@ -81,9 +86,11 @@ runs:
|
|||||||
echo "::set-output name=default_branch::${{ github.event.repository.default_branch }}"
|
echo "::set-output name=default_branch::${{ github.event.repository.default_branch }}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
echo "::endgroup::"
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: tag
|
- id: tag
|
||||||
run: |
|
run: |
|
||||||
|
echo "::group::tag"
|
||||||
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||||
REF=$(printf "%q" "${{ github.ref }}")
|
REF=$(printf "%q" "${{ github.ref }}")
|
||||||
TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
|
TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
|
||||||
@ -93,6 +100,7 @@ runs:
|
|||||||
else
|
else
|
||||||
echo "::set-output name=is_tag::false"
|
echo "::set-output name=is_tag::false"
|
||||||
fi
|
fi
|
||||||
|
echo "::endgroup::"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user