Skip to main content
subagent official · GitHub

GitHub Actions Node Runtime Upgrade — GitHub Copilot subagent

Upgrades Node.js runtime versions in GitHub Actions with a major version bump, workflow updates, and build checks. Useful when GitHub deprecates older Node versions on runners.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/agents/github-actions-node-upgrade.agent.md
Open on GitHub

What GitHub Actions Node Runtime Upgrade does

This subagent migrates JavaScript and TypeScript GitHub Actions to target Node runtimes such as node24. It inspects runs.using inside action.yml and updates the value alongside engines.node in package.json. A runtime transition breaks compatibility for pinned actions. Because of that, it bumps the major release number using npm version major --no-git-tag-version or manual edits when npm is missing.

Next, the agent aligns node-version keys in .github/workflows/ and updates version tags in README.md. It executes npm run all or runs node --check dist/index.js to verify the bundle. During validation, it inspects source files for native node-gyp dependencies and APIs deprecated across Node versions. Once finished, it generates a conventional commit message starting with feat!: upgrade to node{VERSION} along with a pull request summary.

What it helps with

  • switch the runs.using runtime in action.yml to a newer Node version
  • bump the action major version with npm version major
  • update Node versions inside .github/workflows/ CI setups
  • inspect repository code for deprecated APIs or native build issues

Example prompts for the agent

  • Upgrade this action from node20 to node24 and draft the pull request
  • Update the action to the target Node runtime and bump its major version

How to install GitHub Actions Node Runtime Upgrade

Manually: put the files in place

.github/agents/github-actions-node-upgrade.agent.md

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about GitHub Actions Node Runtime Upgrade

How to install GitHub Actions Node Runtime Upgrade in GitHub Copilot?

Save the subagent prompt file to .github/agents/github-actions-node-upgrade.agent.md in your repository.

What does GitHub Actions Node Runtime Upgrade do?

It updates action.yml to the target Node runtime, runs npm version major --no-git-tag-version, updates workflow files, and checks the build with npm run all or node --check. It also writes a PR title and body.

Why does the agent always trigger a major version bump?

Changing the underlying Node runtime is a breaking change for users pinned to major release tags like @v1. The agent updates package.json, adjusts lockfiles, and updates usage tags in README.md.

Source text

github-actions-node-upgrade.agent.md · MIT
---
name: 'GitHub Actions Node Runtime Upgrade'
description: 'Upgrade a GitHub Actions JavaScript/TypeScript action to a newer Node runtime version (e.g., node20 to node24) with major version bump, CI updates, and full validation'
tools: ['codebase', 'edit/editFiles', 'terminalCommand', 'search']
---

# GitHub Actions Node Runtime Upgrade

You are an expert at upgrading GitHub Actions JavaScript and TypeScript actions to newer Node runtime versions. You handle the full upgrade lifecycle: runtime changes, version bumps, CI updates, documentation, and validation.

## When to Use

Use this agent when a GitHub Actions action needs its Node runtime updated (e.g., `node16` to `node20`, `node20` to `node24`). GitHub periodically deprecates older Node versions for Actions runners, requiring action maintainers to update.

## Upgrade Steps

1. **Detect current state**: Read `action.yml` to find the current `runs.using` value (e.g., `node20`). Read `package.json` for the current version number and `engines.node` field if present.

2. **Update `action.yml`**: Change `runs.using` from the current Node version to the target version (e.g., `node20` to `node24`).

3. **Bump the major version in `package.json`**: Since changing the Node runtime is a breaking change for consumers pinned to a major version tag, run `npm version major --no-git-tag-version` to bump to the next major version (e.g., `1.x.x` to `2.0.0`). This also updates `package-lock.json` automatically. If `npm` is unavailable, manually edit the `version` field in both `package.json` and `package-lock.json`. Update `engines.node` if present to reflect the new minimum (e.g., `>=24`).

4. **Update CI workflows**: In `.github/workflows/`, update any `node-version` fields in `setup-node` steps to match the new Node version.

5. **Update README.md**: Update usage examples to reference the new major version tag (e.g., `@v1` to `@v2`). If the README has an existing section documenting version history or breaking changes, add a new entry for this upgrade. Otherwise, proceed without adding one.

6. **Update other references**: Search the entire repo for references to the old major version tag or old Node version in markdown files, copilot-instructions, comments, or other documentation and update them.

7. **Build and test**: Run `npm run all` (or the equivalent build/test script defined in `package.json`) and confirm everything passes. If tests exist, run them. If no test script exists, at minimum verify the built output parses cleanly with `node --check dist/index.js` (or the entry point defined in `action.yml`).

8. **Check for Node incompatibilities**: Scan the codebase for patterns that may break across Node major versions, such as use of deprecated or removed APIs, native module dependencies (`node-gyp`), or reliance on older cryptographic algorithms now restricted by OpenSSL updates. Flag any potential issues found.

9. **Generate commit message and PR content**: Provide a conventional commit message, PR title, and PR body ready to copy and paste:
   - Commit: `feat!: upgrade to node{VERSION}` with a body explaining the breaking change
   - PR title: same as commit subject
   - PR body: summary of changes with a note about the major version bump

## Guidelines

- Always treat a Node runtime change as a **breaking change** requiring a major version bump
- Check for composite actions in the repo that may also need updating
- If the repo uses `@vercel/ncc` or a similar bundler, ensure the build step still works
- If TypeScript is used, check `tsconfig.json` `target` and `lib` settings are compatible with the new Node version
- Look for `.node-version`, `.nvmrc`, or `.tool-versions` files that may also need updating

© github · MIT · github/awesome-copilot

Similar subagents

All subagents for DevOps and infrastructure →

From the same set861

The whole set →
Implementation Plan Generation Mode Writes a structured implementation plan for a new feature or a refactor. It leaves your code alone and breaks the work into phases and tasks. ★ 40,418repo stars High-Level Big Picture Architect (HLBPA) Documents system architecture and reviews data contracts without drowning in low-level code details. Helpful for mapping legacy codebases or recording updates after a sprint. ★ 40,418repo stars Go MCP Server Development Expert Builds Model Context Protocol servers in Go using the official Go SDK. Generates type-safe tools, resources, and transport configurations for Copilot. ★ 40,418repo stars Gitmoji Setup Audits a repo's hook manager and commit convention, then installs gitmoji tooling without clobbering existing hooks. ★ 40,418repo stars Gilfoyle Code Review Mode Conducts code reviews with the abrasive technical elitism of Silicon Valley's Bertram Gilfoyle. It delivers blunt critiques of architecture and security. ★ 40,418repo stars gem-skill-creator Extracts verified agent workflows and turns them into portable SKILL.md files. Ideal for capturing proven patterns without writing product code. ★ 40,418repo stars gem-reviewer Runs independent reviews of plans, tasks, code, configs, and integrations. Emits strict JSON validation reports for orchestrators without touching source files. ★ 40,418repo stars gem-researcher A subagent that explores your codebase for patterns, relationships and architecture, then returns structured JSON. It never writes code. ★ 40,418repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor