Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keita-hino/get-node-version-from-volta
https://github.com/keita-hino/get-node-version-from-volta
github-actions volta
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/keita-hino/get-node-version-from-volta
- Owner: keita-hino
- License: mit
- Created: 2021-11-21T07:28:54.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-28T08:27:23.000Z (over 1 year ago)
- Last Synced: 2024-10-16T12:33:13.923Z (3 months ago)
- Topics: github-actions, volta
- Language: TypeScript
- Homepage:
- Size: 901 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# get-node-version-from-volta
If you are using [volta](https://volta.sh/) 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.](https://docs.volta.sh/guide/getting-started)
2. [Run volta pin command.](https://docs.volta.sh/reference/pin)# Usage
Please add to an existing workflow file with reference to the following.```yml
name: get node versionon: 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.```js
...
"volta": {
"node": "18.16.0"
}
...
```# License
All scripts in this project are released under the MIT License.