https://github.com/codemask-labs/update-nvmrc-action
Action to update node version in .nvmrc file
https://github.com/codemask-labs/update-nvmrc-action
Last synced: 5 months ago
JSON representation
Action to update node version in .nvmrc file
- Host: GitHub
- URL: https://github.com/codemask-labs/update-nvmrc-action
- Owner: codemask-labs
- Created: 2025-02-21T13:12:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-02T02:19:50.000Z (over 1 year ago)
- Last Synced: 2025-06-11T09:07:54.660Z (about 1 year ago)
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Update-nvmrc-action
Composite Github workflow for updating `.nvmrc` file.
## Prerequisites
To start using this action, you need to grant GitHub Actions permission to create pull requests. You can do this by enabling the option "Allow GitHub Actions to create and approve pull requests" in your GitHub organization settings (Settings → Actions → General).
## Inputs
### `use-only-lts`
Use LTS version of Node.js. Default true.
### `github-token`
**Required** Github token for creating a pull request with latest version (similar to dependabot)
## Example usage
```yaml
name: Update .nvmrc to latest LTS
on:
schedule:
- cron: '0 0 * * 1' # runs every Monday at 0:00
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-nvmrc:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: codemask-labs/update-nvmrc-action@v1.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
```