feat(workflows): drop workflow_dispatch from publish trigger #35
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/workflows-publish-trigger"
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
publish.yamltriggers onrelease: [published]only;workflow_dispatchremoved.derive-tag.shsimplified:FORGEJO_EVENT_RELEASE_TAG_NAMEis the only source of the tag.AGENTS.mdtrigger note and procedure step 2 rewritten to match.Why
release: published+workflow_dispatchas the publish trigger. The dispatch arm was a workaround for a draft-first procedure that wasn't firing the workflow at the time, but on closer reading of the Forgejo v16.0 actions docs,release.publisheddoes fire for draft releases on this host ("published: the release was created"). The dispatch arm is no longer needed and adds two failure modes:ref/event_nameclaim rules loosened in the Authorized Integration to letworkflow_dispatchmint publishable JWTs, any future workflow added to this repo can mint a publishable token. Retightening requires admin-UI access, not a PR.release.published. The post-mortem narrative is wrong about Issue 1; the trigger fix landed inf9bcfeeis the real change, andworkflow_dispatchwas scaffolding around the misdiagnosis.release: publishedagainst the tag ref. No fallback path is required; if a future draft doesn't fire, the recovery is the documented delete-and-redo flow.push: tags: ['v*']instead — re-introduces the pre-6d02892coupling betweengit push vX.Y.Zand CI, and conflicts with the plugin-driven release flow in AGENTS.md.release: types: [created, published]— keeps the manual-fallback ergonomic of dispatch but at the cost of two events firing, doubling CI load on every release.Verification
bun run linton the branchbun run typecheckon the branchtsc --noEmitexit 0bun teston the branchci.yamlworkflow_dispatchOut of scope
event_name/refclaim rules — that's an admin-UI change, not a repo change. Once this lands and v0.5.2 has shipped green, the rules can be retightened in the Forgejo admin UI as a follow-up.event_namerule is unchanged by this PR; flagging it again here so a future maintainer retightening the rule knows what depends on it.Risk carried
If the v0.5.1 post-mortem's "drafts didn't fire" claim is correct for this specific host build and the v16.0 docs are wrong, the next v0.5.2 draft will fail to trigger the workflow. Recovery is documented in AGENTS.md step 3 (delete release + tag, redo). Carrying this risk knowingly; the alternative (keeping
workflow_dispatchas a permanent escape hatch) re-perpetuates the security-policy widening described above.