Skip to content

Commit 1ba8b44

Browse files
committed
chore: update codecov/codecov-action to v4
1 parent 17d5dad commit 1ba8b44

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/upload_coverage_report.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,17 @@ jobs:
2727
--workspace
2828
--lcov
2929
--output-path "${{ env.REPORT_NAME }}"
30-
- name: Upload coverage to codecov
31-
uses: codecov/codecov-action@v3
30+
- name: Upload coverage to codecov (tokenless)
31+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
32+
uses: codecov/codecov-action@v4
3233
with:
3334
files: "${{ env.REPORT_NAME }}"
3435
fail_ci_if_error: true
36+
- name: Upload coverage to codecov (with token)
37+
if: "! github.event.pull_request.head.repo.fork "
38+
uses: codecov/codecov-action@v4
39+
with:
40+
token: ${{ secrets.CODECOV_TOKEN }}
41+
files: "${{ env.REPORT_NAME }}"
42+
fail_ci_if_error: true
3543
...

0 commit comments

Comments
 (0)