Skip to content

chore(ci): 更新 GitHub Actions 到 Node 24 兼容版本#1051

Merged
suxb201 merged 1 commit into
tair-opensource:v4from
DCjanus:chore/actions-node24-upgrade-upstream
May 18, 2026
Merged

chore(ci): 更新 GitHub Actions 到 Node 24 兼容版本#1051
suxb201 merged 1 commit into
tair-opensource:v4from
DCjanus:chore/actions-node24-upgrade-upstream

Conversation

@DCjanus

@DCjanus DCjanus commented May 17, 2026

Copy link
Copy Markdown
Contributor

背景

GitHub Actions 已开始弃用 Node.js 20 action runtime:

本 PR 将 RedisShake workflow 使用的 actions 升级到 Node.js 24 兼容版本。

改动

  • 升级 GitHub 官方 actions 到 Node 24 兼容版本,例如 checkout@v6setup-go@v6setup-python@v6cache@v5
  • magnetikonline/action-golang-cache 替换为 setup-go@v6 内建 cache。
  • 同步更新 pages、release、docker workflow 里相关的第三方 actions。

Cache 行为变化

magnetikonline/action-golang-cache 仍封装了旧版 setup-go / cache action;切到 setup-go@v6 内建 cache 后,可以直接使用官方 Node 24 兼容 action,并减少一层第三方封装。

这会带来以下 cache 行为差异:

  • 缓存内容不变:仍缓存 GOMODCACHEGOCACHE
  • cache key 更细:从 Linux-golang-${hash(**/go.sum)} 变为包含 OS、架构、runner image、Go 版本和默认 go.sum hash 的 key。
  • dependency path 使用默认值:setup-go@v6 默认读取仓库根目录 go.sum;RedisShake 当前只有这一个 go.sum,所以无需显式配置。
  • restore 更保守:不再用 Linux-golang- 这类宽泛前缀回退,首次命中率可能降低,但更不容易复用到不匹配的旧 cache。

构建和测试命令不变;Go 版本来源仍是 go.mod,cache 也沿用 setup-go@v6 的默认开启行为。如果后续引入多个 Go module,再补 cache-dependency-path: '**/go.sum' 即可。

Assisted-by: Codex:gpt-5.5
@suxb201 suxb201 merged commit 46a3388 into tair-opensource:v4 May 18, 2026
10 checks passed
@DCjanus DCjanus deleted the chore/actions-node24-upgrade-upstream branch May 18, 2026 07:46
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.

2 participants