We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
codecov/codecov-action
v4
1 parent ab094ef commit e7226e5Copy full SHA for e7226e5
.github/workflows/build.yml
@@ -16,8 +16,17 @@ jobs:
16
distribution: 'adopt'
17
- name: Build with Maven
18
run: mvn --batch-mode --update-snapshots verify
19
- - name: Upload coverage to codecov
20
- uses: codecov/codecov-action@v3
+ - name: Upload coverage to codecov (tokenless)
+ if: >-
21
+ github.event_name == 'pull_request' &&
22
+ github.event.pull_request.head.repo.full_name != github.repository
23
with:
- files: "${{ env.REPORT_NAME }}"
24
+ files: "${{ env.COVERAGE_REPORT_PATH }}"
25
+ fail_ci_if_error: true
26
+ - name: Upload coverage to codecov (with token)
27
+ if: "! github.event.pull_request.head.repo.fork "
28
+ uses: codecov/codecov-action@v4
29
+ with:
30
+ token: ${{ secrets.CODECOV_TOKEN }}
31
32
fail_ci_if_error: true
0 commit comments