Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

ci(codecov): enable tokenless coverage uploads on fork PRs (#2535)

Maximilian Roosf5e7b6fadd03
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index f6eb8c35c..2e0e43e18 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -112,7 +112,7 @@ jobs:
path: target/nextest/default/junit.xml
- name: 📊 Upload test results to Codecov
- if: ${{ !cancelled() && github.repository_owner == 'max-sixty' }}
+ if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
@@ -409,10 +409,10 @@ jobs:
path: cobertura.xml
- name: Upload to codecov.io
- # Codecov action raises errors on forks; allow running on PRs to main repo
- if: github.repository_owner == 'max-sixty'
uses: codecov/[email protected]
with:
files: cobertura.xml
- fail_ci_if_error: true
+ # Soft-fail on fork PRs: secrets aren't available there, so we rely on
+ # tokenless upload, which can hiccup. Keep hard-fail on the main repo.
+ fail_ci_if_error: ${{ github.repository_owner == 'max-sixty' }}
token: ${{ secrets.CODECOV_TOKEN }}