Skip to content

Commit b310eec

Browse files
skip codecov upload on Dependabot PRs (#1425)
Dependabot PRs run in a sandboxed environment without access to repository secrets, so `CODECOV_TOKEN` is unavailable and the codecov upload fails with: ``` Upload queued for processing failed: {"message":"Token required because branch is protected"} ``` This adds `if: github.actor != 'dependabot[bot]'` to each `codecov/codecov-action` step so the upload is skipped for Dependabot PRs. No coverage changes are expected from dependency bumps, so this is safe. Automated by [dependabot-config-bot](https://github.com/shravangoswami-bot/dependabot-config-bot). Co-authored-by: shravangoswami-bot <shravangoswami-bot@users.noreply.github.com>
1 parent 173defb commit b310eec

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
- uses: julia-actions/julia-processcoverage@v1
7777

7878
- uses: codecov/codecov-action@v7
79+
if: github.actor != 'dependabot[bot]'
7980
with:
8081
files: lcov.info
8182
token: ${{ secrets.CODECOV_TOKEN }}
@@ -101,6 +102,7 @@ jobs:
101102
- uses: julia-actions/julia-processcoverage@v1
102103

103104
- uses: codecov/codecov-action@v7
105+
if: github.actor != 'dependabot[bot]'
104106
with:
105107
files: lcov.info
106108
token: ${{ secrets.CODECOV_TOKEN }}
@@ -126,6 +128,7 @@ jobs:
126128
- uses: julia-actions/julia-processcoverage@v1
127129

128130
- uses: codecov/codecov-action@v7
131+
if: github.actor != 'dependabot[bot]'
129132
with:
130133
files: lcov.info
131134
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/Enzyme.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- uses: julia-actions/julia-processcoverage@v1
3838

3939
- uses: codecov/codecov-action@v7
40+
if: github.actor != 'dependabot[bot]'
4041
with:
4142
files: lcov.info
4243
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)