Repository navigation
chore(ci): 节省 runner 时间:路径过滤、并发取消、出口探测 - #149
Merged
Merged
Conversation
- CI Check 增加 paths-ignore:只改 .github/**、README、LICENSE 的 PR 不再触发 - CI Check 增加 concurrency:同一 PR 连推只跑最新一次 - CI Check / Deploy 增加 github.com 可达性探测(30 秒内失败), 避免出口故障时 checkout 三次重试白跑 7 分钟 - 两个工作流增加 timeout-minutes: 20 兜底 Co-Authored-By: Claude Code <noreply@anthropic.com>
paths-ignore 会让必需检查 build 不上报,GitHub 视为未完成而阻塞合并。 改为 workflow 照常触发、checkout 后判断改动是否只含元数据, 只含则跳过安装/构建,job 仍以成功状态上报 build。 Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
问题
self-hosted runner 时间被三类开销浪费:
npm ci+ 全站构建,但 CI 对这些改动没有验证价值;checkout三次重试各等 2 分钟以上,一次故障白跑约 7 分钟(今天已发生三次)。改动
ci-check.yml:增加paths-ignore(.github/**、README.md、LICENSE*)、concurrency(同 PR 取消旧任务)、timeout-minutes: 20。ci-check.yml/deploy.yml:checkout 前增加 github.com 可达性探测,3 次 × 10 秒内失败即退出,替代长时间重试。deploy.yml:增加concurrency: deploy-main(串行,不取消进行中的部署)和timeout-minutes: 20。验证
.github/**,按新规则不会触发 CI Check——这本身就是paths-ignore生效的验证。🤖 Generated with Claude Code