Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codecov tries to fetch oidc token also on PR from fork #1435

Closed
shahar-h opened this issue May 17, 2024 · 0 comments · Fixed by #1437
Closed

codecov tries to fetch oidc token also on PR from fork #1435

shahar-h opened this issue May 17, 2024 · 0 comments · Fixed by #1437

Comments

@shahar-h
Copy link
Contributor

shahar-h commented May 17, 2024

When running codecov action v4.4.0 with oidc enabled on PR from fork, it tries to fetch oidc token and fails:

Run codecov/codecov-action@6d798873df2b1b8e5846dba6fb86631229fbcb17
  with:
    fail_ci_if_error: true
    files: ./coverage.xml
    name: codecov-envoy-gateway
    verbose: true
    use_oidc: true
Error: Codecov: Failed to get OIDC token with url: https://codecov.io./ Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable

According to #1404 I expect it to skip token fetching and use tokenless request.
My temporary workaround is to set use_oidc to true only on push event or on PR from the same repo:

use_oidc: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant