Skip to content

Commit

Permalink
fix: use double-quotes for OIDC (#1669)
Browse files Browse the repository at this point in the history
* fix: get log for use oidc

* fix: add oidc run

* fix: move the oidc call

* fix: update to use double quote on oidc
  • Loading branch information
thomasrockhu-codecov authored Nov 19, 2024
1 parent 9c78078 commit e8603fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ jobs:
name: codecov-demo
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov (oidc)
uses: ./
with:
files: ./coverage/script/coverage-final.json
flags: script,${{ matrix.os }}
name: codecov-script
use_oidc: true
verbose: true
- name: Upload coverage to Codecov (version)
uses: ./
with:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ runs:
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=api://AzureADTokenExchange" | cut -d\" -f6)
echo "CC_TOKEN=$CC_TOKEN" >> "$GITHUB_ENV"
else
if [ -n ${{ inputs.token }} ];
Expand Down

0 comments on commit e8603fa

Please sign in to comment.