diff --git a/action.yml b/action.yml index 3a6ee3070..f99bba61b 100644 --- a/action.yml +++ b/action.yml @@ -203,15 +203,17 @@ runs: GITHUB_REPOSITORY: ${{ github.repository }} - name: Get OIDC token - if: ${{ inputs.use_oidc == 'true' }} uses: actions/github-script@v7 id: oidc with: script: | - const id_token = await core.getIDToken(process.env.CC_OIDC_AUDIENCE) - return id_token + if (process.env.CC_USE_OIDC === 'true' && process.env.CC_FORK != 'true') { + const id_token = await core.getIDToken(process.env.CC_OIDC_AUDIENCE) + return id_token + } env: CC_OIDC_AUDIENCE: ${{ inputs.url || 'https://codecov.io' }} + CC_USE_OIDC: ${{ inputs.use_oidc }} - name: Get and set token shell: bash