ci: DCO 在 bot PR 上真跑(去掉 actor 级 if)+ docker-build 并发去重 - #160
Merged
Merged
Conversation
dco.yml:删掉作业级 if: github.actor != 'dependabot[bot]'。 实测该行让作业在 #148/#149/#150 上结论为 skipped —— 被 skip 的检查拿不到 conclusion=pass,于是 DCO 永远无法设为必需检查。豁免本来就在脚本体内按 "提交作者"判(BOT_AUTHOR_EMAILS 含 dependabot 与 github-actions 两个邮箱), 放开后 bot PR 会真跑并 exit 0。四场景已用工作流原文脚本在临时仓验过: dependabot 未签名=pass / github-actions 未签名=pass / 人类未签名=仍 fail / 人类带签名=pass,闸门不会因此变永真。 docker-build.yml:加 concurrency = workflow+ref、cancel-in-progress=true。 该作业 push:false + load:true,不写注册表也不用 buildx 层缓存,取消无外部副作用; 单程 20+ 分钟,同分支连续 push 不必再堆队列。 docker-publish.yml 本次不动:它写共享层缓存(cache-to type=gha,scope=tts-mm), 且文件内注释记录了 2026-09-22 的实测结论 —— 恒定 group 是有意做的全局互斥, "按 ref 分组"当时被否掉(重叠的两条恰是不同 ref),而 cancel-in-progress 关掉是 因为中途取消会留半份层缓存、并可能让 :latest 停在中间态。改它等于推翻一次实测, 留给维护者裁定。 Signed-off-by: ReSerendipity <ReSerendipity@users.noreply.github.com>
ReSerendipity
enabled auto-merge (squash)
September 24, 2026 07:00
ReSerendipity
deleted the
ci/dco-runs-on-bot-prs-and-build-concurrency
branch
September 24, 2026 11:55
This was referenced Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
两项,只碰
.github/workflows/(2 files,+15 −6)。1.
dco.yml:删掉作业级if: github.actor != 'dependabot[bot]'为什么要删:这一行让作业在 dependabot PR 上整体 skipped —— 实测 #148/#149/#150 三条的
dco作业结论都是skipped(gh api .../actions/workflows/dco.yml/runs可直接看到)。被 skip 的检查拿不到conclusion=pass,所以 DCO 现在没法被设为必需检查。豁免逻辑本来就在脚本体内,按提交作者判(BOT_AUTHOR_EMAILS含49698333+dependabot[bot]与41898282+github-actions[bot]两个邮箱)。改完自查(已做,四场景 + 一个对照组,用的是从工作流里抽出的脚本原文,在临时 git 仓跑):
Signed-off-byrc=0,「人类提交 0 条、机器提交豁免 1 条、失败=0」rc=0,豁免 2 条rc=1,「人类 1 条、失败=1」rc=0,「人类 1 条、失败=0」HEAD_SHArc=1+::error::Could not determine PR base/head SHA依赖前提也已核:#148/#149/#150 各 1 条提交,作者邮箱逐一命中豁免名单(且它们的 commit message 本来就带
Signed-off-by,双保险)。本 PR 自身是人类未豁免路径的活样本 —— 下面DCO Check = pass就是它在真 runner 上跑过而非 skip 的证据。2.
docker-build.yml:加concurrency = workflow+ref、cancel-in-progress: true该作业
push: false+load: true,不写注册表、也不用 buildx 层缓存(grepcache-from|cache-to在本文件 0 命中),所以取消没有外部副作用;单程实测 22–30 min,同分支连续 push 不必再堆队列。审计里一次 main push 的 53 min 墙钟中,docker-build + docker-publish 占 44.4 min。3.
docker-publish.yml本次不动(要请你裁定)你要求的 group/cancel 口径放到 publish 上会推翻一次有记录的实测:
cache-from: type=gha,scope=tts-mm/cache-to: type=gha,mode=min,scope=tts-mm,注释写明固定 scope 是为了让 push/PR/tag 共用一个桶(Actions 缓存配额 10 GiB,历史上就是被这里吃满的,见 ci(docker): 层缓存改 mode=min + 固定 scope(9.52 GiB 的 buildkit 把配额吃满了) #133)。group: docker-publish是有意的全局互斥。cancel-in-progress: false的注释理由:中途取消会留半份层缓存,并可能让:latest停在中间态;而它同时是发布产物的唯一出口(打不可变 semver + sha tag)。也就是说:改成 per-ref group 会重新放开缓存争用,改
cancel: true会在发布中途可被取消。要真做,我建议只加一条"同 ref 内去重、跨 ref 仍串行"的写法(例如 group 用docker-publish-${{ github.event_name }},或给 tag 事件单独一个不取消的组),但这是改语义,留给你拍板。想要原方案的话一句话我就照改。未做(按你的"留后续")
release-gate 权重无关检查拆 fixture 变体、update-baselines 加 cron、gpu-smoke 标签互斥(
['self-hosted','gpu']+PowerShell vs['self-hosted','gpu','linux'])、#142/#145/#148/#149/#150 一律未碰。Refs: #158 #142 #145