Skip to content

Commit

Permalink
Merge pull request #142 from trail-of-forks/tob-indicate-oidc
Browse files Browse the repository at this point in the history
Add explanation of why the OIDC publishing was chosen to the log output.
  • Loading branch information
webknjaz authored Apr 3, 2023
2 parents 29930c9 + dfde872 commit 69efb8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions oidc-exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
{message}
You're seeing this because the action wasn't given the inputs needed to
perform password-based or token-based authentication. If you intended to
perform one of those authentication methods instead of trusted
publishing, then you should double-check your secret configuration and variable
names.
Read more about trusted publishers at https://docs.pypi.org/trusted-publishers/
"""

Expand Down
3 changes: 2 additions & 1 deletion twine-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ if [[ "${INPUT_USER}" == "__token__" && -z "${INPUT_PASSWORD}" ]] ; then
echo \
'::notice::Attempting to perform OIDC credential exchange' \
'to retrieve a temporary short-lived API token for authentication' \
"against ${INPUT_REPOSITORY_URL}"
"against ${INPUT_REPOSITORY_URL} due to __token__ username with no" \
'supplied password field'
INPUT_PASSWORD="$(python /app/oidc-exchange.py)"
elif [[ "${INPUT_USER}" == '__token__' ]]; then
echo \
Expand Down

0 comments on commit 69efb8c

Please sign in to comment.