Skip to content

Commit 8c4cea1

Browse files
committed
ci: skip codecov upload for fork PRs
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.
1 parent 6fd2cdd commit 8c4cea1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ jobs:
7575
"
7676
7777
- name: Upload coverage to Codecov
78+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
7879
uses: codecov/codecov-action@v4
7980
with:
8081
use_oidc: true

0 commit comments

Comments
 (0)