Skip to content

Commit 128b0ed

Browse files
Add GitHub Actions runtime upgrade skill (#2016)
* feat: add github actions runtime upgrade instructions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: add runtime upgrade skill for github actions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * refine runtime upgrade skill guidance Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1887784 commit 128b0ed

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

docs/README.skills.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to
188188
| [git-flow-branch-creator](../skills/git-flow-branch-creator/SKILL.md)<br />`gh skills install github/awesome-copilot git-flow-branch-creator` | Intelligent Git Flow branch creator that analyzes git status/diff and creates appropriate branches following the nvie Git Flow branching model. | None |
189189
| [github-actions-efficiency](../skills/github-actions-efficiency/SKILL.md)<br />`gh skills install github/awesome-copilot github-actions-efficiency` | Audit GitHub Actions workflow efficiency and recommend fixes to reduce CI minutes and costs. | `references/actions.md`<br />`references/patterns.md`<br />`references/reporting.md`<br />`references/review-rubric.md` |
190190
| [github-actions-hardening](../skills/github-actions-hardening/SKILL.md)<br />`gh skills install github/awesome-copilot github-actions-hardening` | Security hardening reviewer for GitHub Actions workflow files (.github/workflows/*.yml). Reasons about the Actions threat model that pattern matchers and general code linters miss — untrusted-input script injection, privileged triggers running fork code, mutable action references, and over-scoped tokens. Use this skill when asked to review, audit, harden, or secure a GitHub Actions workflow, when writing a new workflow, or for any request like "is this workflow safe?", "review my CI for security issues", "why is pull_request_target dangerous here?", "pin my actions", or "lock down GITHUB_TOKEN permissions". Covers script injection via ${{ }} interpolation, pull_request_target / workflow_run privilege escalation, SHA-pinning of third-party actions, least-privilege permissions, GITHUB_ENV/GITHUB_OUTPUT injection, secret exposure, OIDC over long-lived credentials, and self-hosted runner exposure on public repositories. | `references/injection.md`<br />`references/permissions-and-tokens.md`<br />`references/report-format.md`<br />`references/supply-chain.md`<br />`references/triggers-and-privilege.md` |
191+
| [github-actions-runtime-upgrade-conventions](../skills/github-actions-runtime-upgrade-conventions/SKILL.md)<br />`gh skills install github/awesome-copilot github-actions-runtime-upgrade-conventions` | Upgrade GitHub Actions to supported runtimes by selecting safe action versions, preserving workflow behavior, and validating post-upgrade execution. | None |
191192
| [github-codespaces-efficiency](../skills/github-codespaces-efficiency/SKILL.md)<br />`gh skills install github/awesome-copilot github-codespaces-efficiency` | Audit and improve GitHub Codespaces efficiency. Use this skill when a user wants faster Codespaces startup, lower Codespaces spend, slim devcontainers, right-size machines, tune idle timeout, or scope prebuilds to branches with sustained usage. | `references/codespaces.md`<br />`references/review-rubric.md` |
192193
| [github-copilot-starter](../skills/github-copilot-starter/SKILL.md)<br />`gh skills install github/awesome-copilot github-copilot-starter` | Set up complete GitHub Copilot configuration for a new project based on technology stack | None |
193194
| [github-issues](../skills/github-issues/SKILL.md)<br />`gh skills install github/awesome-copilot github-issues` | Create, update, and manage GitHub issues using MCP tools. Use this skill when users want to create bug reports, feature requests, or task issues, update existing issues, add labels/assignees/milestones, set issue fields (dates, priority, custom fields), set issue types, manage issue workflows, link issues, add dependencies, or track blocked-by/blocking relationships. Triggers on requests like "create an issue", "file a bug", "request a feature", "update issue X", "set the priority", "set the start date", "link issues", "add dependency", "blocked by", "blocking", or any GitHub issue management task. | `references/dependencies.md`<br />`references/images.md`<br />`references/issue-fields.md`<br />`references/issue-types.md`<br />`references/projects.md`<br />`references/search.md`<br />`references/sub-issues.md`<br />`references/templates.md` |
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: github-actions-runtime-upgrade-conventions
3+
description: 'Upgrade GitHub Actions to supported runtimes by selecting safe action versions, preserving workflow behavior, and validating post-upgrade execution.'
4+
---
5+
6+
# GitHub Actions Runtime Upgrade Conventions
7+
8+
Use this skill when editing GitHub Actions workflows to address deprecation warnings about action runtimes (for example Node.js runtime migrations).
9+
10+
## Use This Skill When
11+
12+
- Workflow logs report an action is running on a deprecated runtime.
13+
- You are upgrading action versions in `.github/workflows/*.yml` or `.github/workflows/*.yaml`.
14+
- You need to keep existing workflow behavior while modernizing action dependencies.
15+
16+
## Upgrade Rules
17+
18+
- Prefer upgrading to the latest stable **major** version of each action that is compatible with the workflow.
19+
- Prefer immutable pins: resolve the target release to a full commit SHA and use that SHA in `uses:`.
20+
- Do not pin to mutable tags or branches (for example `@v4` or `@main`) in final recommendations.
21+
- Upgrade one action at a time per commit (or one tightly related group) so failures are easy to isolate.
22+
- Keep existing workflow behavior unchanged while upgrading runtime/dependency actions.
23+
24+
## Actions We Track in This Repo
25+
26+
Prioritize runtime review for these groups when warnings appear:
27+
28+
- Any first-party action under `actions/*`
29+
- Especially setup actions under `actions/setup-*` (for example `setup-node`, `setup-python`, `setup-dotnet`)
30+
- Any other action explicitly named by the runtime deprecation warning in workflow logs
31+
32+
## Pinning Pattern
33+
34+
```yaml
35+
steps:
36+
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.3.1
37+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.4
38+
```
39+
40+
When recommending upgrades, identify the latest compatible release first, then use the corresponding commit SHA with an optional version comment.
41+
42+
## Verification Checklist
43+
44+
After changing action versions:
45+
46+
1. Ensure all edited workflows still parse and keep the same triggers/permissions unless intentionally changed.
47+
2. Run the affected workflows (or equivalent local build/test commands) and confirm the upgraded steps complete successfully.
48+
3. Confirm release/signing/artifact steps still produce expected outputs where applicable.
49+
4. Check workflow run logs for any new deprecation warnings or runtime migration notes.
50+
51+
## PR Notes
52+
53+
Include in the PR summary:
54+
55+
- Which actions were upgraded (from -> to).
56+
- Whether any action could not move to a new major and why.
57+
- Which workflows were re-run to validate the change.
58+
59+
## How This Complements Dependabot
60+
61+
Dependabot can automate many updates, but this skill still helps when:
62+
63+
- Dependabot is not enabled for workflows in a repository.
64+
- Runtime warnings appear before an automated update is available.
65+
- A workflow needs behavior-preserving validation after the action bump.

0 commit comments

Comments
 (0)