Skip to content

Commit 04d67d5

Browse files
authored
Merge pull request #1008 from vdice/ci/codecov-upload
ci(build.yml): only upload to codecov if fermyon org
2 parents f7bc474 + 905d282 commit 04d67d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,12 @@ jobs:
317317
env:
318318
RUST_LOG: spin=trace
319319

320+
# Only attempt to upload to codecov.io if the repo owner is fermyon.
321+
# This allows forks to run CI on their own main branches as usual,
322+
# without needing to have a codecov token for uploading.
320323
- name: Upload to codecov.io
321324
uses: codecov/codecov-action@v3
322-
if: ${{ github.ref == 'refs/heads/main' }}
325+
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'fermyon' }}
323326
with:
324327
fail_ci_if_error: true
325328
verbose: true

0 commit comments

Comments
 (0)