mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-07 19:47:25 +00:00
fix: OIDC on forks (#1823)
This commit is contained in:
parent
ad3126e916
commit
b203f00e21
1 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue