A PR from a fork fails with `Error: Input required and not supplied: token` or empty secrets, while PRs from branches pass.
IntermediateTroubleshootingGitHub, Actions and Pull Request Issues
Answer
Likely causes → For pull_request events from forks, GitHub does not pass repository secrets and gives a read-only GITHUB_TOKEN. This protects secrets from untrusted code in the fork.
Diagnose → github.event.pull_request.head.repo.fork == true and the secret expands to empty.
Fix → Make fork PR jobs work without secrets (skip deploy/publish steps with if: github.event.pull_request.head.repo.full_name == github.repository). If you need privileged actions like labeling or commenting, use pull_request_target or a workflow_run follow-up without checking out and executing the fork's code.
Prevent → Never combine pull_request_target with actions/checkout of github.event.pull_request.head.sha and running its build — that's the classic "pwn request".
More on GitHub, Actions and Pull Request Issues
A workflow step that pushes a version bump fails with `remote: Permission to org/repo.git denied to github-actions[bot].` and `The requested URL returned error: 403`.IntermediateA workflow pushes a commit or tag, but the workflow that should run on that push or tag never starts.IntermediateA container job fails on any Git command with `fatal: detected dubious ownership in repository at '/__w/app/app'`.IntermediateYour PR suddenly shows 340 changed files and dozens of commits you did not write.IntermediateThe PR is stuck on `Expected — Waiting for status to be reported` for a required check called `build`.IntermediateThe PR was approved, but merging shows "Review required" again after you pushed a small fix.Beginner