Skip to content
target

GitHub Action

get-node-version-from-volta

v0.1.0 Latest version

get-node-version-from-volta

target

get-node-version-from-volta

get node version from volta

Installation

Copy and paste the following snippet into your .yml file.

              

- name: get-node-version-from-volta

uses: keita-hino/get-node-version-from-volta@v0.1.0

Learn more about this action in keita-hino/get-node-version-from-volta

Choose a version

get-node-version-from-volta

If you are using volta to manage node versions, you can use this action to automate the management of node versions in workflows.

preparation  

  1. Install volta in your project.
  2. Run volta pin command.

Usage

Please add to an existing workflow file with reference to the following.

name: get node version

on: push

jobs:
  buid:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Get node version from volta
        id: get-node-version
        uses: keita-hino/get-node-version-from-volta@main
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ steps.get-node-version.outputs.nodeVersion }}

Outputs

nodeVersion

The node version specified in package.json will be set.

...
"volta": {
  "node": "18.16.0"
}
...

License

All scripts in this project are released under the MIT License.