chore(ci): 更新 GitHub Actions 到 Node 24 兼容版本#1051
Merged
suxb201 merged 1 commit intoMay 18, 2026
Merged
Conversation
Assisted-by: Codex:gpt-5.5
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 Actions 已开始弃用 Node.js 20 action runtime:
本 PR 将 RedisShake workflow 使用的 actions 升级到 Node.js 24 兼容版本。
改动
checkout@v6、setup-go@v6、setup-python@v6、cache@v5。magnetikonline/action-golang-cache替换为setup-go@v6内建 cache。Cache 行为变化
magnetikonline/action-golang-cache仍封装了旧版setup-go/cacheaction;切到setup-go@v6内建 cache 后,可以直接使用官方 Node 24 兼容 action,并减少一层第三方封装。这会带来以下 cache 行为差异:
GOMODCACHE和GOCACHE。Linux-golang-${hash(**/go.sum)}变为包含 OS、架构、runner image、Go 版本和默认go.sumhash 的 key。setup-go@v6默认读取仓库根目录go.sum;RedisShake 当前只有这一个go.sum,所以无需显式配置。Linux-golang-这类宽泛前缀回退,首次命中率可能降低,但更不容易复用到不匹配的旧 cache。构建和测试命令不变;Go 版本来源仍是
go.mod,cache 也沿用setup-go@v6的默认开启行为。如果后续引入多个 Go module,再补cache-dependency-path: '**/go.sum'即可。