github-actions-runtime-upgrade-conventions
它能做什么
这个工具可以帮你更新运行在过时环境中的部分代码(也就是 “actions”)。它会推荐更新、更安全的版本,并确保一切功能与之前保持一致。
适用场景
- ✓当 GitHub 提示某个运行时环境已被弃用时。
- ✓当你更新工作流文件中的 “actions” 时。
- ✓当你希望在不改变现有行为的前提下,把 “actions” 更新到较新的版本时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/github-actions-runtime-upgrade-conventions/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“将 GitHub actions 升级到受支持的运行时,同时保持工作流行为不变。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会分析哪些 “actions” 已经过时,并推荐最新的稳定版本。出于安全性和可预测性的考虑,它会优先使用固定标识符(SHA),而不是可变的 tag。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
GitHub Actions Runtime Upgrade Conventions
Use this skill when editing GitHub Actions workflows to address deprecation warnings about action runtimes (for example Node.js runtime migrations).
Use This Skill When
- Workflow logs report an action is running on a deprecated runtime.
- You are upgrading action versions in
.github/workflows/*.ymlor.github/workflows/*.yaml. - You need to keep existing workflow behavior while modernizing action dependencies.
Upgrade Rules
- Prefer upgrading to the latest stable major version of each action that is compatible with the workflow.
- Prefer immutable pins: resolve the target release to a full commit SHA and use that SHA in
uses:. - Do not pin to mutable tags or branches (for example
@v4or@main) in final recommendations. - Upgrade one action at a time per commit (or one tightly related group) so failures are easy to isolate.
- Keep existing workflow behavior unchanged while upgrading runtime/dependency actions.
Actions We Track in This Repo
Prioritize runtime review for these groups when warnings appear:
- Any first-party action under
actions/* - Especially setup actions under
actions/setup-*(for examplesetup-node,setup-python,setup-dotnet) - Any other action explicitly named by the runtime deprecation warning in workflow logs
Pinning Pattern
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.3.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.4
When recommending upgrades, identify the latest compatible release first, then use the corresponding commit SHA with an optional version comment.
Verification Checklist
After changing action versions:
- Ensure all edited workflows still parse and keep the same triggers/permissions unless intentionally changed.
- Run the affected workflows (or equivalent local build/test commands) and confirm the upgraded steps complete successfully.
- Confirm release/signing/artifact steps still produce expected outputs where applicable.
- Check workflow run logs for any new deprecation warnings or runtime migration notes.
PR Notes
Include in the PR summary:
- Which actions were upgraded (from -> to).
- Whether any action could not move to a new major and why.
- Which workflows were re-run to validate the change.
How This Complements Dependabot
Dependabot can automate many updates, but this skill still helps when:
- Dependabot is not enabled for workflows in a repository.
- Runtime warnings appear before an automated update is available.
- A workflow needs behavior-preserving validation after the action bump.
常见问题
什么是 GitHub 的 “actions”?
它们是一些小型程序,用于在 GitHub 上自动执行任务,例如构建代码、运行测试或发布内容。它们运行在特定的环境(运行时)中。
为什么需要更新运行时?
过时的环境可能存在安全隐患,甚至会无法继续运行。及时更新可以确保你的自动化任务稳定、安全地运行。
它和 Dependabot 有什么区别?
Dependabot 可以自动完成更新。但在以下情况下,这个工具会更有用:尚未配置 Dependabot 时;在自动更新之前出现弃用提示时;或者你需要仔细验证每一处变更时。
详情
作者的原始描述
Upgrade GitHub Actions to supported runtimes by selecting safe action versions, preserving workflow behavior, and validating post-upgrade execution.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7226
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。