8000 [BUG] `use_oidc: true` breaks uploads from forks since v5.4.1 · Issue #1821 · codecov/codecov-action · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[BUG] use_oidc: true breaks uploads from forks since v5.4.1 #1821
Closed
@lkubb

Description

@lkubb

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:

if: ${{ inputs.use_oidc == 'true' }}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0