fix: dispatch deploy via INFRA_DISPATCH_TOKEN instead of FORGEJO_TOKEN #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/cross-repo-dispatch-token"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since Forgejo 15.0, secrets.FORGEJO_TOKEN is treated as a reserved
name — defining a repo secret with that name no longer overrides the
runner-injected forgejo-actions token, and that auto-token is scoped
to the repo running the workflow, so cross-repo workflow dispatch
returns 404.
Switch the deploy dispatch step to read from secrets.INFRA_DISPATCH_TOKEN
(a PAT with write:repository scope on brooktrails/infra) and fail loudly
with a pointed error if it isn't configured. The existing FORGEJO_TOKEN-
backed steps (checkout, tag fetch, tag push) keep using the auto-token
because they only operate on this repo. The whoami diagnostic step now
identifies the dispatch token, which is the one whose identity actually
matters when the dispatch goes wrong.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com