From d09079a508d18bb472c5d63921ed805dbd2c6557 Mon Sep 17 00:00:00 2001 From: David Hiendl Date: Tue, 24 Oct 2023 11:05:54 +0200 Subject: [PATCH] add debug output --- action.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index a7a5466..3792618 100644 --- a/action.yml +++ b/action.yml @@ -59,13 +59,16 @@ runs: echo "git_base_ref_branch=$(eval printf "%s" "$BASE_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 "::debug::git_base_ref_branch=$BASE_REF" + echo "::debug::git_head_ref_branch=$HEAD_REF" + echo "::debug::git_ref_branch=$REF_BRANCH" else BASE_REF=$(printf "%q" "${{ github.event.base_ref }}") BASE_REF=${BASE_REF/refs\/heads\/${{ inputs.strip_tag_prefix }}/} echo "git_base_ref_branch=$(eval printf "%s" "$BASE_REF")" >> "$GITHUB_OUTPUT" + echo "::debug::git_base_ref_branch=$BASE_REF" fi - - cat $GITHUB_OUTPUT | xargs -d "\n" -L1 echo "::debug::" shell: bash - id: current_branch @@ -74,11 +77,12 @@ runs: if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then if [[ ${{ github.event_name }} == *"pull_request"* ]]; then echo "git_current_branch=${{ steps.branch.outputs.git_head_ref_branch }}" >> "$GITHUB_OUTPUT" + echo "::debug::git_current_branch=${{ steps.branch.outputs.git_head_ref_branch }}" else echo "git_current_branch=${{ steps.branch.outputs.git_ref_branch }}" >> "$GITHUB_OUTPUT" + echo "::debug::git_current_branch=${{ steps.branch.outputs.git_ref_branch }}" fi fi - cat $GITHUB_OUTPUT | xargs -d "\n" -L1 echo "::debug::" shell: bash - id: default @@ -88,12 +92,15 @@ runs: if [[ "${{ steps.current_branch.outputs.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_default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT" + echo "::debug::git_is_default=true" + echo "::debug::git_default_branch=${{ github.event.repository.default_branch }}" else echo "git_is_default=false" >> "$GITHUB_OUTPUT" echo "git_default_branch=${{ github.event.repository.default_branch }}" >> "$GITHUB_OUTPUT" + echo "::debug::git_is_default=false" + echo "::debug::git_default_branch=${{ github.event.repository.default_branch }}" fi fi - cat $GITHUB_OUTPUT | xargs -d "\n" -L1 echo "::debug::" shell: bash - id: tag @@ -104,17 +111,19 @@ runs: TAG=${REF/refs\/tags\/${{ inputs.strip_tag_prefix }}/} echo "git_tag=$(eval printf "%s" "$TAG")" >> "$GITHUB_OUTPUT" echo "git_is_tag=true" >> "$GITHUB_OUTPUT" + echo "::debug::git_tag=$TAG" + echo "::debug::git_is_tag=true" else echo "git_is_tag=false" >> "$GITHUB_OUTPUT" + echo "::debug::git_is_tag=false" fi - cat $GITHUB_OUTPUT | xargs -d "\n" -L1 echo "::debug::" shell: bash - id: ci_hostname run: | CI_HOSTNAME=$(echo $GITHUB_SERVER_URL | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/') echo "ci_hostname=$CI_HOSTNAME" >> "$GITHUB_OUTPUT" - cat $GITHUB_OUTPUT | xargs -d "\n" -L1 echo "::debug::" + echo "::debug::ci_hostname=$CI_HOSTNAME" shell: bash branding: