annangela/Cached node_modules
A GitHub Action to cache node_modules
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 9, 2026
- License
- MIT
Pinned Snippet
uses: annangela/cached_node-modules@095ea9ae366bc4a18c0f653aed2008d35660317d # v6.0.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| packageManager | The package manager to use (npm, pnpm, or yarn). Affects default lockfilePath, command, and {PM} magic variable. | no | npm |
| cacheKey | The key of the cache | no | cached_node-modules:{OS_NAME}:node@{NODE_VERSION_MAJOR}_{NODE_ARCH}:{PM}@{PM_VERSION_MAJOR}:{LOCKFILE}@{LOCKFILE_HASH_SHA2_256}{CUSTOM_VARIABLE} |
| customVariable | The custom variable to insert to the cache key | no | "" |
| command | The command to run for installing dependencies. If empty, defaults based on packageManager. | no | "" |
| cwd | The working directory | no | . |
| lockfilePath | The path to the lockfile. If empty, defaults based on packageManager. | no | "" |
| packageJsonPath | The path to the package.json | no | package.json |
| networkErrorRetryTime | The retry time when network error occurs while running the command, `0` means no retry | no | 3 |
| githubToken | The GitHub token | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| cacheKey | The parsed cacheKey |
| variables | A JSON string contains all the variables used in `cacheKey` |
| cache-hit | Whether the cache is hit |