Skip to content

ci: tag the release at the commit rainbond pinned - #140

Merged
yangkaa merged 1 commit into
goodrain:mainfrom
yangkaa:pinned-release-target
Oct 19, 2026
Merged

yangkaa merged 1 commit into
goodrain:mainfrom
yangkaa:pinned-release-target

Conversation

@yangkaa

@yangkaa yangkaa commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

背景

rainbond 主仓库的发版入口(release.yml)会在 E2E 门禁通过后固定四个仓库的 commit,并据此构建镜像。但下游仓库的 auto-release-from-rainbond.yml 目前总是在当前 main 的最新提交上打 tag。如果从门禁到下游打 tag 之间 main 有新提交,tag 指向的就不是测过、构建过的代码。

改动

给 auto-release-from-rainbond.yml 增加可选输入 target:

  • 传入时:必须是 40 位完整 SHA,且必须在 main 上(用 compare API 校验),然后把 tag 打在这个 commit 上;否则失败,不创建 tag。
  • 不传时:行为与现在完全一致(打在 main 上)。

手动发版、现有的触发方式都不受影响。

合并顺序

请先合并本 PR,再合并 rainbond 主仓库里传 target 的改动;否则带 target 的触发会被旧工作流以 “Unexpected inputs” 拒绝。

验证(在 fork 上真实运行)

用例 结果
指定 main 上较早的 commit 成功,tag 打在指定 commit 上
指定不在 main 上的 commit 失败:... is not on main (compare status: unknown-commit),不创建 tag
指定短 SHA 失败:target must be a full 40-character commit SHA
不指定 成功,tag 打在 main 上
由 rainbond 的 release-publish 传入 chart commit 成功,日志 Tagging pinned commit …,tag 与传入一致

四个下游仓库(console / ui / operator / chart)使用同一份改动。

Signed-off-by: yangkaa <catkin.ni@gmail.com>
@yangkaa
yangkaa force-pushed the pinned-release-target branch from 4037e0d to db2e985 Compare October 18, 2026 18:34
@yangkaa
yangkaa marked this pull request as ready for review October 19, 2026 10:28
@yangkaa
yangkaa merged commit f32aa07 into goodrain:main Oct 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant