We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
codecov-action
v4
1 parent 36d29bb commit ac0fa84Copy full SHA for ac0fa84
.github/workflows/upload_coverage_report.yml
@@ -23,9 +23,17 @@ jobs:
23
- name: Generate code coverage
24
run: |
25
go test -coverprofile="${{ env.REPORT_NAME }}" ./...
26
- - name: Upload coverage to codecov
27
- uses: codecov/codecov-action@v3
+ - name: Upload coverage to codecov (tokenless)
+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
28
+ uses: codecov/codecov-action@v4
29
with:
30
files: "${{ env.REPORT_NAME }}"
31
fail_ci_if_error: true
32
+ - name: Upload coverage to codecov (with token)
33
+ if: "! github.event.pull_request.head.repo.fork "
34
35
+ with:
36
+ token: ${{ secrets.CODECOV_TOKEN }}
37
+ files: "${{ env.REPORT_NAME }}"
38
+ fail_ci_if_error: true
39
...
0 commit comments