LiveAgent icon indicating copy to clipboard operation
LiveAgent copied to clipboard

ci(actions): move workflows to node24 actions and prepare for pull_request_target default block

Open AlphaCatMeow opened this issue 4 weeks ago • 1 comments

背景

GitHub Actions 的两项变化会影响本仓库的 workflow:

  1. Actions 运行时已移除 Node 20,仍声明 node20 的 action 需要升级到 node24 版本(变更日志)。
  2. 公开仓库从 2026-12-02 起默认拦截 pull_request_target,除非 Actions 事件策略显式允许(变更日志)。

现状

  • 仍是 node20 的 action:setup-go@v5、stale@v9、create-github-app-token@v2、create-pull-request@v7、paths-filter@v3、golangci-lint-action@v8,以及 docker/setup-qemu、setup-buildx、login(v3)、metadata(v5)、build-push(v6)。
  • .github/workflows/pr-governance.yml 使用 pull_request_target。它只通过 API 读取 PR 元数据,不检出也不执行 PR 代码。不处理的话,12-02 之后 PR 治理检查会被默认拦截。

方案

  • 上述 action 升到各自的 node24 大版本。
  • pr-governance.yml 保持现状,加注释说明依赖事件策略,并把 actions/github-script 固定到提交 SHA。
  • 新增 docs/operations/actions-event-policy.md,列出需要上游 admin 在仓库设置里启用的事件策略。该设置需要 admin 权限,不在 PR 内。

AlphaCatMeow avatar Nov 05 '26 06:11 AlphaCatMeow

This issue has been inactive for 14 days and is marked stale. It will be closed in 14 days if there is no further activity.

github-actions[bot] avatar Nov 19 '26 10:11 github-actions[bot]