fix: update OIDC audience (#1675)

* 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
This commit is contained in:
Tom Hu
2024-11-19 15:20:22 -05:00
committed by GitHub
parent e8603fa307
commit 28b3165f92

View File

@@ -163,10 +163,10 @@ runs:
- name: Get and set token - name: Get and set token
shell: bash shell: bash
run: | run: |
if [ ${{ inputs.use_oidc }} == 'true' ]; if [ "${{ inputs.use_oidc }}" == 'true' ];
then then
# {"count":1984,"value":"***"} # {"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" echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
else else
if [ -n ${{ inputs.token }} ]; if [ -n ${{ inputs.token }} ];