https://github.com/trilogy-group/action-npm-install-dependencies
https://github.com/trilogy-group/action-npm-install-dependencies
Last synced: 3 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 (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-12T20:42:01.000Z (over 1 year ago)
- Last Synced: 2025-03-21T17:18:11.832Z (3 months ago)
- Language: TypeScript
- Size: 446 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 }}
```