mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-08 08:06:27 +00:00
fix: OIDC on forks (#1823)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user