← All recipes
Moderne licensed

Increase Node.js version in GitHub Actions

Recipe IDorg.openrewrite.node.migrate.increase-node-engine-version-in-github-actionsArtifact@openrewrite/recipes-nodejs

Increases node-version in actions/setup-node steps in GitHub Actions workflows. Only modifies plain major version values (e.g. 20) and x-ranges (e.g. 20.x). Never decreases the version.

Single recipeProprietary

Usage

You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.node.migrate.increase-node-engine-version-in-github-actions --recipe-option "version=22"

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-nodejs

Options

NameTypeDescription
versionrequiredThe Node.js major version to set, e.g. 20 or 22.
e.g. 22