跳到正文
Skillpedia
部署与云(DevOps)40k · #7226

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/github-actions-runtime-upgrade-conventions/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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/*.yml or .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 @v4 or @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 example setup-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:

  1. Ensure all edited workflows still parse and keep the same triggers/permissions unless intentionally changed.
  2. Run the affected workflows (or equivalent local build/test commands) and confirm the upgraded steps complete successfully.
  3. Confirm release/signing/artifact steps still produce expected outputs where applicable.
  4. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能