Skip to content

Commit

Permalink
fix: update OIDC audience (#1675)
Browse files Browse the repository at this point in the history
* dnm: whats the token

* fix: show the url

* fix: do the echo

* fix: just echo

* fix: true == true

* fix get the action

* fix: use audience
  • Loading branch information
thomasrockhu-codecov authored Nov 19, 2024
1 parent e8603fa commit 28b3165
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ runs:
- name: Get and set token
shell: bash
run: |
if [ ${{ inputs.use_oidc }} == 'true' ];
if [ "${{ inputs.use_oidc }}" == 'true' ];
then
# {"count":1984,"value":"***"}
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | cut -d\" -f6)
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io" | cut -d\" -f6)
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
else
if [ -n ${{ inputs.token }} ];
Expand Down

0 comments on commit 28b3165

Please sign in to comment.