Pass additional restore-keys to cache action
As can be seen in their examples: https://github.com/actions/cache/blob/main/examples.md#java---gradle
It is recommended that additional restore-keys are passed when using actions/cache. https://github.com/actions/cache#inputs
Line 100 in 5b36705
| const matchedKey = await cache.restoreCache(packageManager.path, primaryKey); |
could be changed to something like:
const restoreKey = `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}`; const matchedKey = await cache.restoreCache(packageManager.path, primaryKey, [restoreKey]);