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
I run this action in a public repo and in PRs from forked repos. The main repo's GitHub secrets are not accessible from PRs, created from forked repos, as this is the default GitHub security setting and we don't want to change it.
Here is the action definition in the workflow:
When it is run from the master or any other branch of the main repo, upload is done successfully. However, once it is run for a PR from a forked repo, the upload fails with the error: Upload failed: {"message":"Token required because branch is protected"}.
It is expected that the token value is empty, as it is stored in the secret and not accessible from such PRs. But the PR's ref is not a protected branch, so the token should not be required. Also, the codecov/codecov-action@v5, defined right before this one in the workflow, runs fine for the same PRs and uploads results successfully in the tokenless mode.
I run this action in a public repo and in PRs from forked repos. The main repo's GitHub secrets are not accessible from PRs, created from forked repos, as this is the default GitHub security setting and we don't want to change it.
Here is the action definition in the workflow:
When it is run from the
master
or any other branch of the main repo, upload is done successfully. However, once it is run for a PR from a forked repo, the upload fails with the error:Upload failed: {"message":"Token required because branch is protected"}
.It is expected that the token value is empty, as it is stored in the secret and not accessible from such PRs. But the PR's ref is not a protected branch, so the token should not be required. Also, the
codecov/codecov-action@v5
, defined right before this one in the workflow, runs fine for the same PRs and uploads results successfully in the tokenless mode.Examples of the runs:
master
branch in the main repo: https://github.com/photoview/photoview/actions/runs/12200416188/job/34036516140#step:7:31The text was updated successfully, but these errors were encountered: