Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nickofthyme/checkout-node-setup
Checkout, setup and install node with dependencies
https://github.com/nickofthyme/checkout-node-setup
Last synced: 7 days ago
JSON representation
Checkout, setup and install node with dependencies
- Host: GitHub
- URL: https://github.com/nickofthyme/checkout-node-setup
- Owner: nickofthyme
- License: mit
- Created: 2022-01-25T16:19:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-23T18:21:19.000Z (over 1 year ago)
- Last Synced: 2024-04-18T05:17:50.542Z (7 months ago)
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Checks](https://github.com/nickofthyme/checkout-node-setup/actions/workflows/checks.yml/badge.svg)](https://github.com/nickofthyme/checkout-node-setup/actions/workflows/checks.yml)
# Checkout node setup
This action combines [`actions/checkout`](https://github.com/actions/checkout), [`actions/setup-node`](https://github.com/bahmutov/npm-install) and [`bahmutov/npm-install`](https://github.com/bahmutov/npm-install) into a single action.
## Inputs
### `skip-checkout`
Skips the checkout step
### `skip-setup-node`
Skips the node setup step
### `skip-npm-install`
Skips the npm install step
## Extended Inputs
All inputs from the three actions are mapped 1:1 as they would be used on their own, with the following exceptions:
### `checkout-token`
Used as the `token` input for `actions/checkout`
### `setup-node-token`
Replaces the `token` input for `actions/setup-node`
### `persist-credentials` from `actions/checkout`
Defaults to `false` instead of `true`
### `node-version` from `actions/setup-node`
Defaults to `env.NODE_VERSION` instead of `undefined`
### Removes deprecated `version` from `actions/setup-node`
This property is removed to prevent warnings in action runs. Use `node-version` instead.
### `useRollingCache` from `bahmutov/npm-install`
Defaults to `true` instead of `false`
## Outputs
None! :tada:
## Example usage
### Before
```yaml
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install node_modules
uses: bahmutov/npm-install@v1
with:
useRollingCache: true
```### After
```yaml
- name: Setup job
uses: nickofthyme/checkout-node-setup@v1
with:
persist-credentials: false
useRollingCache: true
```