release-on-merge doesn't trigger build-image #497
Labels
No labels
Kestra
bug
enhancement
someday
subtask
☁️ api
🎛️ infrastructure
🐞 sentry
📆 2025 Season
📝 pages
allpicks
📝 pages
picks
📝 pages
standings
🚀 performance
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
johnsturgeon/tgfp-web#497
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Summary
When a bump PR merges,
release-on-merge.ymlcreates the release correctly, butbuild-image.ymlnever runs, so no image is pushed for the new version. Production ends up a release behind.Observed
release-on-merge.ymlran green and created release2.32.0(target0ea2ffb).build-image.ymldid not run at all — nobuild-and-pushrun for the release event.2.32.0image was missing from the registry until manually dispatched.Root cause
Forgejo (matching GitHub) suppresses new workflow runs from any event triggered by the built-in Actions token, to prevent recursive runs.
The chain is:
release-on-merge.ymlauthenticates assecrets.FJ_TOKEN || secrets.GITHUB_TOKEN.FJ_TOKENis not set, so it falls back to the built-in token. That token can write the release (so creation succeeds), but because the built-in token created it, therelease:publishedevent is suppressed andbuild-image.ymlis never triggered.The intent was already documented in
.forgejo/workflows/build-image.yml:The missing piece is the PAT itself.
Fix
write:repositoryscope.FJ_TOKEN(user-level, matching howFJ_API_URLis set). No workflow code change needed —release-on-merge.ymlalready prefersFJ_TOKENover the built-in token.build-image.ymlshould run on its own with eventrelease(notworkflow_dispatch).Fallback if it still doesn't chain
Some Forgejo versions do not emit a
releaseevent for releases created via the REST API, even under a PAT. If the chain still doesn't fire after the PAT is in place, add an explicit dispatch as the last step ofrelease-on-merge.yml(still under the PAT), removing the dependency on event chaining:Workaround used now
Dispatched
build-image.ymlmanually (workflow_dispatch, refmain) to build and push the2.32.0image.Side effect to note
claude.ymlandclaude-code-review.ymlshare the sameFJ_TOKEN || GITHUB_TOKENfallback. OnceFJ_TOKENis set, their comments will be attributed to the PAT's user instead of the actions bot — cosmetic only.release-on-merge doesn't trigger build-image (release created by built-in token)to release-on-merge doesn't trigger build-image