fix(ci): push release commits with a service account token #41
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
qa:preview
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quatrain/core!41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/40-publish-push-protected-branch"
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?
Closes #40
Change
.forgejo/workflows/ci.yaml, jobpublish: the checkout uses the repository secretRELEASE_BOT_TOKEN, so the push of the version bumps and of the release tags is made by a service account instead of the automatic workflow token. A first step stops the job, before anything is published, when the secret is missing.guidelines/CONTRIBUTING_AGENTS.md: the secret is documented.Why
On a protected branch the forge answers the push of the automatic token with an internal error (
user does not exist [uid: -2]in the pre-receive hook, Forgejo 15.0.11). Packages were published to npm and their versions never recorded.Before merging
Until
RELEASE_BOT_TOKENexists, thepublishjob fails at its first step and publishes nothing. Set up first:developandmain;write:repository, stored as the repository secretRELEASE_BOT_TOKEN.Verified
The workflow file parses. The
publishjob only runs on pushes todevelopandmain, so the CI of this pull request does not exercise the change: the first push todevelopafter the merge does.To know
A push made with a personal token starts workflows, unlike the automatic token. The bump commit carries
[skip ci], which the forge honours.🤖 Generated with Claude Code
Closed without merging: the maintainer changed the branch rights instead, so the publish job keeps the automatic token. Merging this would make the job fail on the missing secret
RELEASE_BOT_TOKEN.Pull request closed