GitHub Action
npm-ci
v1.3.0
Latest version
This GitHub action will install npm dependencies, using cache if already cached. The cache is based on packages found in package-lock.json
files in source, which are stored as packages-only-lock.json
over the course of the action.
Will log a warning if node_modules
folder is not found after installing the dependencies.
steps:
- uses: chill-viking/npm-ci@latest
name: Install dependencies
with:
working_directory: './npm-root-folder/'
The latest
tag will be used for the latest release created, but specific version tags will be created if you need to use a specific version up to the minor version. See releases for details on releases, or tags to view other tags that are available.
Make sure to check out the repository before using this action.
steps:
- uses: actions/checkout@v3
name: Checkout repository
- uses: chill-viking/npm-ci@latest
name: Install dependencies
Name | Description | Required | Default |
---|---|---|---|
working_directory |
The directory to install dependencies in (location of package-lock.json ). |
No | ./ |
Name | Description |
---|---|
restored_from_cache |
true if the dependencies were restored from cache, false otherwise. |
The following combinations of runner and Node.js version(s) are checked in the workflow
Runner | Node.js |
---|---|
ubuntu-latest |
14.x , 16.x , 18.x |
windows-latest |
18.x |
macos-latest |
18.x |