mirror of
https://gitea.com/actions/setup-node.git
synced 2025-12-14 04:31:34 +08:00
feat(cache): add flag to only restore cache
This commit is contained in:
@@ -33,6 +33,10 @@ const cachePackages = async (packageManager: string) => {
|
||||
core.debug(`Caching for '${packageManager}' is not supported`);
|
||||
return;
|
||||
}
|
||||
if (core.getInput('cache-restore-only') == true ){
|
||||
core.info(`Cache was not saved since 'cache-restore-only' was set }`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cachePaths.length) {
|
||||
// TODO: core.getInput has a bug - it can return undefined despite its definition (tests only?)
|
||||
|
||||
Reference in New Issue
Block a user