Repository navigation
chore(ci): 升级 GitHub Actions 到 v7 - #9
Merged
Merged
Conversation
动因:CI 日志一直报 Node.js 20 弃用告警,四类 action 都还停在基于 node20 的大版本。 - actions/checkout v4 -> v7 - actions/setup-python v5 -> v7 - actions/setup-node v4 -> v7 - actions/upload-artifact v4 -> v7 兼容性:本仓库对这四个 action 只用基础参数(python-version、node-version、name/path/if-no-files-found),未启用 cache;v5-v7 的破坏性变更集中在 node24 运行时、node 自动缓存范围收窄、fork PR 的 checkout 拦截,均不涉及现有用法。 YAML 已本地解析校验(三个 job 结构完好)。
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.
动因
CI 日志持续告警:
checkout@v4/setup-node@v4/setup-python@v5/upload-artifact@v4仍基于 Node 20,被 runner 强制跑到 Node 24。改动
actions/checkoutactions/setup-pythonactions/setup-nodeactions/upload-artifact9 处
uses全部升级,无旧版本残留。兼容性核对
本仓库对这四个 action 只用基础参数:
python-version、node-version、name/path/if-no-files-found;未启用cache。v5→v7 的破坏性变更都落在不影响现有用法的地方:
setup-node的自动缓存范围收窄到 npm(本仓库未开 cache)checkoutv7 拦截pull_request_target/workflow_run下的 fork PR checkout(本仓库不用这两个事件)upload-artifactv6 要求 runner ≥ 2.327.1(托管 runner 满足)本地已用 PyYAML 解析校验,三个 job(static / routing / quality)结构完好。
与 PR #8 的关系
这个分支从
main起,只改了 workflow 的 uses 行;PR #8 改的是同一文件的 steps 内容。两者合并时该文件会冲突,解法是取并集:uses 用本 PR 的 v7,steps 用 PR #8 的版本。验证
本 PR 会触发 CI——static 与 routing 两个 job 都会用 v7 实跑一次,跑通即证明升级无破坏。