Skip to content

Commit 48b317d

Browse files
committed
Merge PR #136 into unstable/v1
This patch improves the logging detalization of which authentication mode is selected when the action runs. It uses the `::notice` workflow command to surface this detail to the workflow run summary page as annotations.
2 parents f3ce18f + ae29550 commit 48b317d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

twine-upload.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,19 @@ INPUT_PRINT_HASH="$(get-normalized-input 'print-hash')"
4343
if [[ "${INPUT_USER}" == "__token__" && -z "${INPUT_PASSWORD}" ]] ; then
4444
# No password supplied by the user implies that we're in the OIDC flow;
4545
# retrieve the OIDC credential and exchange it for a PyPI API token.
46-
echo "::notice::In OIDC flow"
46+
echo \
47+
'::notice::Attempting to perform OIDC credential exchange ' \
48+
'to retrieve a temporary short-lived API token for authentication ' \
49+
"against ${INPUT_REPOSITORY_URL}"
4750
INPUT_PASSWORD="$(python /app/oidc-exchange.py)"
51+
elif [[ "${INPUT_USER}" == '__token__' ]]; then
52+
echo \
53+
'::notice::Using a user-provided API token for authentication ' \
54+
"against ${INPUT_REPOSITORY_URL}"
55+
else
56+
echo \
57+
'::notice::Using a username + password pair for authentication ' \
58+
"against ${INPUT_REPOSITORY_URL}}"
4859
fi
4960

5061
if [[

0 commit comments

Comments
 (0)