You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@KATT , the CODECOV_TOKEN is currently required even for OSS-projects.
As for forks of repos, if the fork is creating a PR against itself, it will need its own CODECOV_TOKEN. However, if it is making a PR against the upstream repo, the token and access to the token are not required.
Below, I'm passing null as a token if it is a fork.
- uses: codecov/codecov-action@v4with:
fail_ci_if_error: true# only use token if not a fork PRtoken: ${{ github.event.pull_request.head.repo.fork == false && secrets.CODECOV_TOKEN || null }}
Failing PR
I tried doing a forked PR against my own repo to see if it worked
- uses: codecov/codecov-action@v4with:
fail_ci_if_error: true# only use token if not a fork PRtoken: ${{ github.event.pull_request.head.repo.fork == false && secrets.CODECOV_TOKEN || '' }}
@KATT I think this is actually a symptom of something else. Yes, it needs to be not null, but just having ${{ secrets.CODECOV_TOKEN }} should default to '' if it's not present.
I've highlighted the bit in the message here that isn't working.
I updated our CI to use
null
as a token if it is a fork, but it doesn't work.The
.yaml
https://github.com/trpc/trpc/blob/3142da9dadfd01bca9bd58126b585381d9482517/.github/workflows/main.yml#L47-L51
Below, I'm passing
null
as a token if it is a fork.Failing PR
I tried doing a forked PR against my own repo to see if it worked
Full output
The text was updated successfully, but these errors were encountered: