Skip to content

Commit ac0fa84

Browse files
committed
chore: update codecov-action to v4
1 parent 36d29bb commit ac0fa84

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/upload_coverage_report.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,17 @@ jobs:
2323
- name: Generate code coverage
2424
run: |
2525
go test -coverprofile="${{ env.REPORT_NAME }}" ./...
26-
- name: Upload coverage to codecov
27-
uses: codecov/codecov-action@v3
26+
- name: Upload coverage to codecov (tokenless)
27+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
28+
uses: codecov/codecov-action@v4
2829
with:
2930
files: "${{ env.REPORT_NAME }}"
3031
fail_ci_if_error: true
32+
- name: Upload coverage to codecov (with token)
33+
if: "! github.event.pull_request.head.repo.fork "
34+
uses: codecov/codecov-action@v4
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
37+
files: "${{ env.REPORT_NAME }}"
38+
fail_ci_if_error: true
3139
...

0 commit comments

Comments
 (0)