mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-08 03:57:26 +00:00
use correct audience when requesting oidc token
This commit is contained in:
parent
ad45165bd4
commit
9da4bbfa9d
1 changed files with 3 additions and 1 deletions
|
|
@ -192,7 +192,7 @@ runs:
|
|||
then
|
||||
# {"count":1984,"value":"***"}
|
||||
echo -e "\033[0;32m==>\033[0m Requesting OIDC token from '$ACTIONS_ID_TOKEN_REQUEST_URL'"
|
||||
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io" | cut -d\" -f6)
|
||||
CC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=$AUDIENCE" | cut -d\" -f6)
|
||||
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
|
||||
elif [ -n "${{ env.CODECOV_TOKEN }}" ];
|
||||
then
|
||||
|
|
@ -206,6 +206,8 @@ runs:
|
|||
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
|
||||
fi
|
||||
fi
|
||||
env:
|
||||
AUDIENCE: ${{ inputs.url || 'https://codecov.io' }}
|
||||
|
||||
- name: Override branch for forks
|
||||
shell: bash
|
||||
|
|
|
|||
Loading…
Reference in a new issue