Files
cozystack/.github/workflows
Marian Koreniuk e89821ca2e ci(release): refuse a Promote RC dispatch from any ref but main
A workflow_dispatch runs the copy of promote-rc.yaml at the ref it was
dispatched from. On 2026-10-16 a dispatch from release-1.6 ran that
branch's older copy, one job instead of five, and had to be re-run from
main. Since the release assets are signed, the same dispatch would now
fail at the upload step, after the staging branch, the promotion-*
candidate and the draft release already exist, and
docs/release/signatures-and-sbom.md pins the signature identity to this
workflow on main.

Make the first step of parse compare github.ref with refs/heads/main and
fail with an error that names main, so a dispatch from a release branch,
a tag or a SHA stops before the first write. The bats test runs the
step's shell under dash for main, a release branch, a tag and an empty
ref, and pins the step to be the first one in parse.

The release docs tell the operator to dispatch from main and state that
only a copy carrying the check refuses other refs: older release-X.Y
copies stay callable and still write before stopping.

Assisted-by: LLM
Signed-off-by: Marian Koreniuk <moriarti@cp.if.ua>
2026-11-27 19:14:10 +01:00
..