-
I wonder how the standard usecase with key = ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} works. The cache is not restored yet, how hashFiles finds the files to hash? |
Beta Was this translation helpful? Give feedback.
Answered by
dhadka
Apr 27, 2022
Replies: 1 comment 1 reply
-
The idea is that you're computing the hash of files already checked into the repo. For the case of |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
leshikus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The idea is that you're computing the hash of files already checked into the repo. For the case of
package-lock.json
, NPM recommends checking in this file as it contains the exact dependencies and versions used by your program (more details at https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json).