From 28b3165f9282bdd8a13b2fbe24c27199da421b5c Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:20:22 -0500 Subject: [PATCH] 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 --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 2b390f3..f2fa3ab 100644 --- a/action.yml +++ b/action.yml @@ -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 }} ];