WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 46648b4

Browse files
committed
Add log grouping + error annotations
Should hopefully make logs clearer to see what is going on.
1 parent bec8dc5 commit 46648b4

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

action.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,33 @@ runs:
121121
CHAINCTL_CONFIG: ${{ inputs.config-path }}
122122
EXPORT_AUTH: ${{ inputs.env-auth }}
123123
run: |
124+
echo "::group::Authenticating with Chainguard as ${{ env.IDENTITY }}"
124125
if chainctl auth login --identity "${{ env.IDENTITY }}" -v=${{ env.VERBOSITY }}; then
125126
echo Logged in as ${{ env.IDENTITY }}!
126127
else
127-
echo Unable to assume the identity ${{ env.IDENTITY }}.
128+
echo "::error Unable to assume the identity ${{ env.IDENTITY }}."
128129
exit 1
129130
fi
131+
echo "::endgroup::"
132+
133+
echo "::group::Authenticating with apk.cgr.dev as ${{ env.IDENTITY }}"
130134
if ! chainctl auth login --identity "${{ env.IDENTITY }}" --audience ${{ inputs.apk-host }} -v=${{ env.VERBOSITY }}; then
131-
echo Unable to assume the identity ${{ env.IDENTITY }} for ${{ inputs.apk-host }}.
135+
echo "::error Unable to assume the identity ${{ env.IDENTITY }} for ${{ inputs.apk-host }}."
132136
exit 1
133137
fi
138+
echo "::endgroup::"
139+
140+
echo "::group::Registering docker credential helper"
134141
if ! chainctl auth configure-docker --identity "${{ env.IDENTITY }}" -v=${{ env.VERBOSITY }}; then
135-
echo Unable to register credential helper as ${{ env.IDENTITY }}.
142+
echo "::error Unable to register credential helper as ${{ env.IDENTITY }}."
136143
exit 1
137144
fi
145+
echo "::endgroup::"
146+
138147
if [ "${{ env.EXPORT_AUTH }}" == "true" ]; then
139-
echo HTTP_AUTH="basic:${{ inputs.apk-host }}:user:$(chainctl auth token --audience ${{ inputs.apk-host }})" >> $GITHUB_ENV
148+
echo "::group::Exporting HTTP_AUTH environment variable for ${{ inputs.apk-host }}"
149+
echo HTTP_AUTH="basic:apk.cgr.dev:user:$(chainctl auth token --audience ${{ inputs.apk-host }})" >> $GITHUB_ENV
150+
echo "::endgroup::"
140151
fi
141152
142153
- name: Authenticate with Chainguard (DEPRECATED invite-code)

0 commit comments

Comments
 (0)