Description
Describe the bug
Previously, when setting use_oidc: true
, the action intelligently decided whether to actually request an OIDC token or not (if it detected it was running on a fork). With v5.4.1+, the input has to be set dynamically by the caller to avoid a hard crash.
To Reproduce
- Have a repository that uploads coverage reports using v5.4.1 or v5.4.2 of this action using OIDC tokens and that is configured via
use_oidc: true
- Create a PR from a fork
- Find that
Get OIDC token
always runs, which results in an error:
==> Fork detected
[...]
Run actions/github-script@v7
[...]
Error: Unhandled error: Error: Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable
Expected behavior
Detects it's running on a fork, skips token request. Works.
Regression
This worked in v5.4.0, regression occurred in 5.4.1 (#1807).
Screenshots
Product Area
codecov-action
Versions
- OS: ubuntu@v24, macos arm64, windows
- Git Host: GitHub
- CI/CD: GitHub Actions
- Uploader: codecov-action@v5.4.2
Commit and CI link
https://github.com/salt-extensions/saltext-vault/actions/runs/14823408227/job/41613462624?pr=125
Additional context
Side note: I would expect fail_ci_if_error: false
to apply in cases like this as well, yet CI reports failure.
Workaround: use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
Problematic line:
Line 206 in ad3126e