annangela/Cached node_modules

A GitHub Action to cache node_modules

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 9, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: annangela/cached_node-modules@095ea9ae366bc4a18c0f653aed2008d35660317d # v6.0.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
packageManagerThe package manager to use (npm, pnpm, or yarn). Affects default lockfilePath, command, and {PM} magic variable.nonpm
cacheKeyThe key of the cachenocached_node-modules:{OS_NAME}:node@{NODE_VERSION_MAJOR}_{NODE_ARCH}:{PM}@{PM_VERSION_MAJOR}:{LOCKFILE}@{LOCKFILE_HASH_SHA2_256}{CUSTOM_VARIABLE}
customVariableThe custom variable to insert to the cache keyno""
commandThe command to run for installing dependencies. If empty, defaults based on packageManager.no""
cwdThe working directoryno.
lockfilePathThe path to the lockfile. If empty, defaults based on packageManager.no""
packageJsonPathThe path to the package.jsonnopackage.json
networkErrorRetryTimeThe retry time when network error occurs while running the command, `0` means no retryno3
githubTokenThe GitHub tokenno${{ github.token }}
namedescription
cacheKeyThe parsed cacheKey
variablesA JSON string contains all the variables used in `cacheKey`
cache-hitWhether the cache is hit