Skip to content

Commit d01f188

Browse files
committed
fix(ci): skip Codecov upload for dependabot PRs
Dependabot PRs don't have access to repository secrets, causing Codecov upload to fail with "Token required because branch is protected". Skip the upload step when actor is dependabot[bot].
1 parent 75ed41c commit d01f188

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
run: just test-coverage
9797

9898
- name: Upload coverage to Codecov
99-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
99+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && github.actor != 'dependabot[bot]'
100100
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
101101
env:
102102
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)