Skip to content

Commit 25453f8

Browse files
committed
fix: upload with token only for main repository
1 parent 0d9ef27 commit 25453f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ jobs:
2525
files: "${{ env.COVERAGE_REPORT_PATH }}"
2626
fail_ci_if_error: true
2727
- name: Upload coverage to codecov (with token)
28-
if: "! github.event.pull_request.head.repo.fork "
28+
if: >
29+
github.repository == 'TheAlgorithms/Java' &&
30+
(github.event_name != 'pull_request' ||
31+
github.event.pull_request.head.repo.full_name == github.repository)
2932
uses: codecov/codecov-action@v4
3033
with:
3134
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)