LiveAgent
LiveAgent copied to clipboard
ci(actions): move workflows to node24 actions and prepare for pull_request_target default block
背景
GitHub Actions 的两项变化会影响本仓库的 workflow:
- Actions 运行时已移除 Node 20,仍声明
node20的 action 需要升级到 node24 版本(变更日志)。 - 公开仓库从 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 内。
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.