Aleksei Sviridkin
0c00c4545e
ci(release): refuse a Promote RC dispatch from any ref but main ( #5181 )
...
## What this PR does
Adds a first step to the `parse` job of `promote-rc.yaml` that fails
when `github.ref` is not `refs/heads/main`, before anything is written.
This is A20 in #3278 .
A `workflow_dispatch` runs the copy of the workflow at the dispatched
ref. On 2026-10-16 a dispatch from `release-1.6` ran that branch's older
copy (one job instead of five,
https://github.com/cozystack/cozystack/actions/runs/38882938797 ) and was
re-run from `main`. Since #4861 the release assets are signed, and the
same dispatch would now fail at the upload step, after the staging
branch, the `promotion-*` candidate and the draft release already exist.
`docs/release.md` also pins the signature identity to this workflow on
`main`, so a dispatch from another ref should stop at the front door.
The step follows the shape of `Validate dispatch branch` in
`cut-prerelease.yaml`: one shell comparison, an `::error::` that names
`main`, `exit 1`.
## Test
`hack/promote-rc-dispatch-ref_test.bats` extracts the step's `run` with
`yq` and executes it under `dash` for `refs/heads/main` (passes), a
release branch, a tag and an empty ref (each fails and names `main`),
and pins the step to be `parse`'s first step reading `github.ref`. It
runs with the rest of `hack/*_test.bats` via `make bats-unit-tests`.
`zizmor` on the workflow reports no findings.
## Docs
One clause in step 3 of the regular release sequence in
`docs/release.md`. #5169 edits the same file further down and the
`promote` job of the same workflow; the hunks do not overlap.
## Checklist
- [x] Commit is signed off with `--signoff`
- [x] Commit carries exactly one `Assisted-by: LLM` trailer
- [x] `hack/check-commit-trailers.sh upstream/main..HEAD` passes
- [x] `bats hack/promote-rc-dispatch-ref_test.bats` and `bats
hack/bats-strict-setup.bats` pass
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Workflow Updates**
* Release candidate promotions dispatched from branches or tags other
than `main` are rejected. Older workflow copies on release branches may
still create a staging branch and draft release before stopping.
* **Documentation**
* Release instructions clarify that promotions must be dispatched from
`main`, regardless of the release line, and note the behavior of older
workflow copies.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-30 18:18:50 +03:00
..
2026-11-30 15:47:15 +03:00
2026-11-24 09:04:49 +01:00
2026-10-26 16:55:36 +03:00
2026-11-24 22:04:24 +01:00
2026-11-24 09:04:49 +01:00
2026-10-18 23:16:45 +03:00
2026-11-27 05:39:18 +01:00
2026-11-12 11:10:43 +03:00
2026-10-07 11:04:00 +03:00
2026-11-16 01:07:37 +03:00
2026-11-06 12:33:37 +00:00
2026-11-13 13:11:46 +05:00
2026-11-13 13:11:46 +05:00
2026-11-16 01:07:37 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-08 20:18:29 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2025-01-09 12:24:51 +01:00
2026-11-16 01:07:36 +03:00
2026-11-16 01:07:36 +03:00
2026-10-07 11:04:00 +03:00
2026-09-10 17:48:22 +05:00
2026-06-24 23:17:25 +03:00
2026-11-16 13:52:40 +03:00
2026-11-12 22:43:23 +03:00
2026-11-23 13:24:41 +01:00
2026-11-23 13:24:41 +01:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-04-14 19:59:19 +05:00
2026-10-29 13:59:43 +01:00
2026-10-07 11:04:00 +03:00
2026-07-24 11:34:17 +05:00
2026-10-07 11:04:00 +03:00
2026-11-06 12:33:37 +00:00
2026-09-21 12:20:22 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-01 01:23:55 +02:00
2026-11-01 02:17:57 +02:00
2026-11-19 15:12:48 +02:00
2026-10-07 11:04:00 +03:00
2026-04-11 17:07:35 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-09-22 17:10:05 +03:00
2026-11-12 18:03:44 +05:00
2026-10-07 11:04:00 +03:00
2026-07-14 13:08:54 +03:00
2026-10-07 11:04:00 +03:00
2026-11-26 10:52:28 +01:00
2026-10-07 11:04:00 +03:00
2026-11-26 10:52:28 +01:00
2025-12-25 16:54:22 +01:00
2026-10-07 11:04:00 +03:00
2026-11-23 11:56:33 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-26 10:52:28 +01:00
2026-10-07 11:04:00 +03:00
2026-11-24 11:49:41 +03:00
2026-11-24 11:49:41 +03:00
2026-10-07 11:04:00 +03:00
2026-10-21 17:50:46 +05:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-24 09:04:49 +01:00
2026-09-25 09:46:43 +05:00
2026-11-12 21:35:53 +01:00
2026-11-26 10:52:28 +01:00
2026-10-07 11:04:00 +03:00
2026-11-17 11:20:20 +03:00
2026-11-04 15:03:06 +00:00
2026-11-04 06:57:03 +00:00
2026-10-07 11:04:00 +03:00
2026-11-23 12:15:06 +03:00
2026-11-09 13:49:42 +03:00
2026-10-07 11:04:00 +03:00
2026-11-06 12:33:37 +00:00
2026-11-06 12:33:37 +00:00
2026-11-08 19:37:03 +01:00
2026-10-07 11:04:00 +03:00
2026-10-09 16:57:43 +03:00
2026-09-28 01:32:37 +03:00
2026-11-02 06:49:13 +01:00
2026-11-02 06:49:13 +01:00
2026-10-07 11:04:00 +03:00
2026-11-09 15:48:57 +07:00
2026-11-10 00:45:07 +07:00
2026-10-07 11:04:00 +03:00
2026-08-05 17:37:04 +03:00
2026-10-07 11:04:00 +03:00
2026-11-10 17:06:15 +03:00
2026-11-12 15:42:25 +05:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-12 15:42:25 +05:00
2026-11-13 11:21:42 +07:00
2026-04-30 14:52:56 +03:00
2026-02-17 22:54:12 +01:00
2026-11-13 13:11:46 +05:00
2026-10-02 03:29:15 +03:00
2026-08-28 15:29:29 +05:00
2026-09-26 15:06:42 +03:00
2026-10-09 02:04:39 +03:00
2026-06-30 19:40:47 +03:00
2026-09-05 13:19:17 +05:00
2026-09-05 13:19:17 +05:00
2026-10-03 01:42:38 +03:00
2026-11-29 13:45:11 +01:00
2026-10-03 01:42:38 +03:00
2026-10-03 01:42:38 +03:00
2026-11-29 13:45:11 +01:00
2026-11-29 13:45:11 +01:00
2026-09-05 13:19:17 +05:00
2026-10-07 04:38:06 +03:00
2026-09-05 13:19:17 +05:00
2026-08-23 19:38:49 +05:00
2026-11-12 16:51:38 +05:00
2026-11-27 08:33:56 +01:00
2026-08-07 23:53:40 +03:00
2026-09-05 14:51:06 +05:00
2026-10-20 12:05:33 +03:00
2026-10-07 11:04:00 +03:00
2026-10-13 15:09:00 +03:00
2026-10-07 16:14:34 +03:00
2026-10-06 16:28:51 +03:00
2026-10-07 11:04:00 +03:00
2026-11-13 13:11:46 +05:00
2026-10-01 19:37:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-26 10:52:28 +01:00
2026-10-19 08:10:26 +00:00
2026-10-07 11:04:00 +03:00
2026-08-12 18:45:22 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-12 09:54:52 +04:00
2026-11-16 01:07:36 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-20 20:18:32 +07:00
2026-10-07 11:04:00 +03:00
2026-11-17 12:22:54 +03:00
2026-11-17 12:22:55 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-20 20:18:32 +07:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-24 21:12:05 +03:00
2026-10-07 11:04:00 +03:00
2026-11-04 07:06:31 +00:00
2026-11-24 09:04:49 +01:00
2026-11-06 12:33:37 +00:00
2026-10-19 19:41:22 +03:00
2026-11-29 13:45:11 +01:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-03-03 19:10:39 +05:00
2026-10-21 17:50:46 +05:00
2026-11-19 15:16:30 +02:00
2026-11-19 15:16:30 +02:00
2026-10-07 11:04:00 +03:00
2026-10-23 19:14:14 +05:00
2026-11-19 15:16:30 +02:00
2026-11-19 15:16:30 +02:00
2026-11-19 15:16:30 +02:00
2026-10-23 19:14:17 +05:00
2026-11-19 15:16:30 +02:00
2026-11-23 08:08:49 +01:00
2026-11-24 09:04:49 +01:00
2026-10-07 11:04:00 +03:00
2026-11-09 11:18:49 +01:00
2026-10-07 11:04:00 +03:00
2026-09-29 11:29:04 +03:00
2026-10-07 11:04:00 +03:00
2026-11-24 22:04:24 +01:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-09-29 11:20:27 +03:00
2026-11-11 12:12:11 +03:00
2026-11-26 21:46:54 +03:00
2026-11-14 20:02:29 +07:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-08-12 18:42:58 +03:00
2026-07-24 18:16:16 +05:00
2026-11-29 13:45:11 +01:00
2026-10-07 11:04:00 +03:00
2026-11-29 13:45:11 +01:00
2026-10-07 11:04:00 +03:00
2026-11-09 11:18:27 +01:00
2026-11-26 21:46:54 +03:00
2026-11-26 21:46:54 +03:00
2026-11-26 21:46:54 +03:00
2026-11-06 12:33:37 +00:00
2024-10-21 11:59:56 +02:00
2026-10-07 11:04:00 +03:00
2026-09-27 16:58:28 +03:00
2026-11-16 01:07:37 +03:00
2026-10-07 11:04:00 +03:00
2026-08-14 18:37:58 +05:00
2026-11-27 13:51:28 +00:00
2026-11-27 19:14:10 +01:00
2026-10-07 11:04:00 +03:00
2026-11-29 13:45:11 +01:00
2026-10-07 11:04:00 +03:00
2026-09-18 17:45:21 +03:00
2026-10-10 21:15:48 +03:00
2026-10-28 18:38:35 +01:00
2026-10-29 11:31:31 +03:00
2026-10-07 11:04:00 +03:00
2026-11-24 21:12:05 +03:00
2026-11-24 21:12:05 +03:00
2026-10-23 22:53:21 +02:00
2026-11-17 01:22:04 +01:00
2026-10-07 11:04:00 +03:00
2026-10-13 12:34:24 +04:00
2026-11-27 10:25:01 +00:00
2026-11-04 15:03:06 +00:00
2026-11-06 12:33:37 +00:00
2026-10-07 11:04:00 +03:00
2026-10-10 21:15:48 +03:00
2026-10-10 21:15:48 +03:00
2026-10-09 17:12:14 +03:00
2026-10-09 17:12:14 +03:00
2026-10-07 11:04:00 +03:00
2026-10-31 23:14:29 +02:00
2026-10-31 23:14:29 +02:00
2026-11-24 09:04:49 +01:00
2026-10-14 16:24:16 +05:00
2026-10-07 11:04:00 +03:00
2026-10-31 23:14:29 +02:00
2026-10-31 23:14:29 +02:00
2026-10-31 23:14:29 +02:00
2026-10-07 11:04:00 +03:00
2026-10-29 12:34:22 +01:00
2026-10-31 23:14:29 +02:00
2026-10-31 23:14:29 +02:00
2026-10-31 23:14:29 +02:00
2026-10-07 11:04:00 +03:00
2026-10-31 23:14:29 +02:00
2026-11-24 09:04:49 +01:00
2026-11-12 16:51:38 +05:00
2026-10-31 23:14:29 +02:00
2026-10-10 20:37:53 +03:00
2026-10-31 23:14:29 +02:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-16 13:28:42 +03:00
2026-11-17 22:07:25 +03:00
2026-07-24 18:16:16 +05:00
2026-11-24 09:04:49 +01:00
2026-11-27 08:33:56 +01:00
2026-10-21 15:04:39 +05:00
2026-11-27 08:33:56 +01:00
2026-11-04 15:03:06 +00:00
2026-11-04 15:03:06 +00:00
2026-11-25 15:49:33 +03:00
2026-10-20 16:40:06 +05:00
2026-10-19 07:55:37 +00:00
2026-10-07 11:04:00 +03:00
2026-10-07 11:04:00 +03:00
2026-11-24 21:12:05 +03:00
2026-10-07 11:04:00 +03:00
2026-11-01 02:18:13 +02:00
2026-10-31 23:40:51 +02:00
2026-10-07 11:04:00 +03:00
2026-10-07 15:41:06 +03:00
2026-10-07 11:04:00 +03:00
2026-11-27 08:33:56 +01:00
2026-11-25 12:00:48 +01:00
2026-10-19 21:18:18 +02:00
2026-10-19 21:18:18 +02:00
2025-11-26 20:18:43 +01:00
2026-10-16 08:18:42 +00:00
2026-10-07 11:04:00 +03:00
2026-10-20 16:40:06 +05:00
2026-10-07 11:04:00 +03:00
2026-10-02 11:02:18 +03:00
2026-11-23 11:55:31 +03:00
2026-11-25 15:49:33 +03:00
2026-10-20 13:38:55 +03:00