Skip to content

ci: skip codecov upload for fork PRs#23

Merged
fullstackjam merged 1 commit intomainfrom
fix/codecov-fork-oidc
Mar 30, 2026
Merged

ci: skip codecov upload for fork PRs#23
fullstackjam merged 1 commit intomainfrom
fix/codecov-fork-oidc

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

Summary

  • Fork PRs cannot obtain an OIDC token from GitHub Actions (security restriction), causing the Codecov upload step to always fail with Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable
  • Add an if condition to skip the step when the PR originates from a fork

Why this matters

All external contributor PRs were showing a red CI check despite all tests passing, which is noisy and misleading.

Behavior after this fix

Trigger Codecov upload
Push to main ✅ runs
PR from same repo ✅ runs
PR from fork ⏭ skipped (tests still run and pass)

OIDC token is unavailable for fork pull requests due to GitHub's
security model. Skip the upload step when the PR comes from a fork
to prevent false CI failures.

Coverage is still uploaded on pushes to main and on PRs from the
same repository.
@github-actions
Copy link
Copy Markdown

👋 Thanks for opening this pull request!

Before merging:

  • Code follows existing patterns in the codebase
  • go build ./... and go vet ./... pass
  • Commit message is clear and descriptive

@fullstackjam will review this soon. Thanks for contributing! 🚀

@fullstackjam fullstackjam merged commit 8c4cea1 into main Mar 30, 2026
4 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

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 this pull request may close these issues.

1 participant