https://github.com/trilogy-group/action-npm-install-dependencies
https://github.com/trilogy-group/action-npm-install-dependencies
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/trilogy-group/action-npm-install-dependencies
- Owner: trilogy-group
- Created: 2021-03-25T11:25:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T13:53:29.000Z (8 months ago)
- Last Synced: 2025-08-24T22:24:33.531Z (4 months ago)
- Language: TypeScript
- Size: 597 KB
- Stars: 2
- Watchers: 8
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This action wraps action/cache to install your npm dependencies in an optimised way.
It differs from directly using action/cache & npm ci in the following ways:
* We cache post-installation (node_modules) rather than pre-installation (~/.npm), to skip post-install script processing
* We always use the image version in the key, so native code is safe
* We de-duplicate files in the cache to save on download time
* We save the cache immediately after installing, to be insultated from build issues (e.g. creating spurious node_modules directories)
To use it, add the following to your GitHub workflow steps:
```
uses: trilogy-group/action-npm-install-dependencies@v1
```
If you want to use a different token to access repositories, you can do this:
```
uses: trilogy-group/action-npm-install-dependencies@v1
env:
GITHUB_TOKEN: ${{ secrets.ENG_STD_TOKEN }}
```