Collection of reusable GitHub Actions
- Install packages using
npm
oryarn
- Caches whole
node_modules
directory - Skips installation step when lockfile cache is hit.
working-directory
– the default working directorycache-key
– an explicit key for restoring and saving the cache
steps:
- uses: actions/checkout@v2
- uses: umidbekk/actions/npm/install@v1
Passing cache-key
strategy:
matrix:
node: ["12", "14"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: umidbekk/actions/npm/install@v1
with:
cache-key: npm-${{ matrix.node }}-