If you are installing different individual tools, you might want to have different caches. You can insert custom cache prefix strings into the cache keys. For example, let's install two different tools, each cache will be separate.
- name: Install tool A
uses: bahmutov/npm-install@v1
with:
# use just package.json checksum
useLockFile: false
install-command: 'npm install tool-a'
cache-key-prefix: tool-a
- name: Install tool B
uses: bahmutov/npm-install@v1
with:
# use just package.json checksum
useLockFile: false
install-command: 'npm install tool-b'
cache-key-prefix: tool-b
The first cache will have key npm-tool-a-... and the second cache will have key npm-tool-b-...
Add cache prefix
If you are installing different individual tools, you might want to have different caches. You can insert custom cache prefix strings into the cache keys. For example, let's install two different tools, each cache will be separate.
The first cache will have key
npm-tool-a-...
and the second cache will have keynpm-tool-b-...