Skip to content

Commit

Permalink
ci: moving back to tokenless
Browse files Browse the repository at this point in the history
See codecov/codecov-action#1431

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
  • Loading branch information
rst0git committed Jul 23, 2024
1 parent b2a1cfe commit 6be7627
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on: [push, pull_request]

jobs:
build:
if: ${{ github.repository == 'checkpoint-restore/go-criu' }}
runs-on: ubuntu-latest
name: Code coverage
steps:
Expand Down Expand Up @@ -47,10 +46,23 @@ jobs:
# Run actual test as root as it uses CRIU.
sudo -E make coverage
# PRs from forked repos don't need tokens for reports to be upload to codecov.
# PRs from the base, need a token.
# https://github.com/codecov/codecov-action/issues/1431

- name: Upload coverage reports to Codecov (tokenless)
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
file: test/.coverage/coverage.out
verbose: true
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
file: test/.coverage/coverage.out
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository

0 comments on commit 6be7627

Please sign in to comment.