use default output for information, added groups
This commit is contained in:
parent
9d3e47920f
commit
e2c94cfebc
36
action.yml
36
action.yml
@ -49,10 +49,8 @@ runs:
|
|||||||
|
|
||||||
- id: information_git
|
- id: information_git
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
ACTIONS_STEP_DEBUG: "true"
|
|
||||||
run: |
|
run: |
|
||||||
echo gathering git information...
|
echo "::group::gathering git information..."
|
||||||
|
|
||||||
# "Set branch names..."
|
# "Set branch names..."
|
||||||
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
|
||||||
@ -69,14 +67,14 @@ runs:
|
|||||||
echo "git_head_ref_branch=$(eval printf "%s" "$HEAD_REF")" >> "$GITHUB_OUTPUT"
|
echo "git_head_ref_branch=$(eval printf "%s" "$HEAD_REF")" >> "$GITHUB_OUTPUT"
|
||||||
echo "git_ref_branch=$(eval printf "%s" "$REF_BRANCH")" >> "$GITHUB_OUTPUT"
|
echo "git_ref_branch=$(eval printf "%s" "$REF_BRANCH")" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
echo "::debug::git_base_ref_branch=$BASE_REF"
|
echo "set git_base_ref_branch=$BASE_REF"
|
||||||
echo "::debug::git_head_ref_branch=$HEAD_REF"
|
echo "set git_head_ref_branch=$HEAD_REF"
|
||||||
echo "::debug::git_ref_branch=$REF_BRANCH"
|
echo "set git_ref_branch=$REF_BRANCH"
|
||||||
else
|
else
|
||||||
BASE_REF=$(printf "%q" "${{ github.event.base_ref }}")
|
BASE_REF=$(printf "%q" "${{ github.event.base_ref }}")
|
||||||
BASE_REF=${BASE_REF/refs\/heads\/${{ inputs.strip_tag_prefix }}/}
|
BASE_REF=${BASE_REF/refs\/heads\/${{ inputs.strip_tag_prefix }}/}
|
||||||
echo "git_base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
|
echo "git_base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT"
|
||||||
echo "::debug::git_base_ref_branch=$BASE_REF"
|
echo "set git_base_ref_branch=$BASE_REF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# "Set the current branch name..."
|
# "Set the current branch name..."
|
||||||
@ -87,7 +85,7 @@ runs:
|
|||||||
CURRENT_BRANCH=$REF_BRANCH
|
CURRENT_BRANCH=$REF_BRANCH
|
||||||
fi
|
fi
|
||||||
echo "git_current_branch=$CURRENT_BRANCH" >> "$GITHUB_OUTPUT"
|
echo "git_current_branch=$CURRENT_BRANCH" >> "$GITHUB_OUTPUT"
|
||||||
echo "::debug::git_current_branch=$CURRENT_BRANCH"
|
echo "set git_current_branch=$CURRENT_BRANCH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# "Set the default branch name..."
|
# "Set the default branch name..."
|
||||||
@ -95,13 +93,13 @@ runs:
|
|||||||
if [[ "$CURRENT_BRANCH" == "${{ github.event.repository.default_branch }}" && "${{ github.event.pull_request.head.repo.fork }}" != "true" ]]; then
|
if [[ "$CURRENT_BRANCH" == "${{ github.event.repository.default_branch }}" && "${{ github.event.pull_request.head.repo.fork }}" != "true" ]]; then
|
||||||
echo "git_is_default=true" >> "$GITHUB_OUTPUT"
|
echo "git_is_default=true" >> "$GITHUB_OUTPUT"
|
||||||
echo "git_default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
|
echo "git_default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
|
||||||
echo "::debug::git_is_default=true"
|
echo "set git_is_default=true"
|
||||||
echo "::debug::git_default_branch=${{ github.event.repository.default_branch }}"
|
echo "set git_default_branch=${{ github.event.repository.default_branch }}"
|
||||||
else
|
else
|
||||||
echo "git_is_default=false" >> "$GITHUB_OUTPUT"
|
echo "git_is_default=false" >> "$GITHUB_OUTPUT"
|
||||||
echo "git_default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
|
echo "git_default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT"
|
||||||
echo "::debug::git_is_default=false"
|
echo "set git_is_default=false"
|
||||||
echo "::debug::git_default_branch=${{ github.event.repository.default_branch }}"
|
echo "set git_default_branch=${{ github.event.repository.default_branch }}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -111,18 +109,24 @@ runs:
|
|||||||
TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
|
TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/}
|
||||||
echo "git_tag=$(eval printf "%s" "$TAG")" >> "$GITHUB_OUTPUT"
|
echo "git_tag=$(eval printf "%s" "$TAG")" >> "$GITHUB_OUTPUT"
|
||||||
echo "git_is_tag=true" >> "$GITHUB_OUTPUT"
|
echo "git_is_tag=true" >> "$GITHUB_OUTPUT"
|
||||||
echo "::debug::git_tag=$TAG"
|
echo "set git_tag=$TAG"
|
||||||
echo "::debug::git_is_tag=true"
|
echo "set git_is_tag=true"
|
||||||
else
|
else
|
||||||
echo "git_is_tag=false" >> "$GITHUB_OUTPUT"
|
echo "git_is_tag=false" >> "$GITHUB_OUTPUT"
|
||||||
echo "::debug::git_is_tag=false"
|
echo "set git_is_tag=false"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- id: information_hostname
|
- id: information_hostname
|
||||||
run: |
|
run: |
|
||||||
|
echo "::group::gathering CI information..."
|
||||||
|
|
||||||
CI_HOSTNAME=$(echo $GITHUB_SERVER_URL | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/')
|
CI_HOSTNAME=$(echo $GITHUB_SERVER_URL | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/')
|
||||||
echo "ci_hostname=$CI_HOSTNAME" >> "$GITHUB_OUTPUT"
|
echo "ci_hostname=$CI_HOSTNAME" >> "$GITHUB_OUTPUT"
|
||||||
echo "::debug::ci_hostname=$CI_HOSTNAME"
|
echo "set ci_hostname=$CI_HOSTNAME"
|
||||||
|
|
||||||
|
echo "::endgroup::"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user