GitHub Actions environment secret not available in a fork PR
By Daniel Zoghalchali·Latchkey
Workflows triggered by pull_request from a fork run without access to secrets, including environment secrets, by design. A step expecting a deploy token from a fork PR sees an empty value.
What this error means
A step that uses an environment secret fails or skips when the run originates from a forked PR, but works on branch pushes.
github-actions
Error: Input required and not supplied: token
# secrets.DEPLOY_TOKEN is empty for pull_request from a fork
Common causes
Fork PRs run without secrets
To protect secrets from untrusted forks, pull_request runs from forks have no access to repository or environment secrets.
How to fix it
Gate secret use or use a safe trigger
Skip secret-dependent steps when the PR comes from a fork (github.event.pull_request.head.repo.fork).
For trusted automation, use a separate workflow on a safe trigger (for example pull_request_target) with strict checkout controls.