feat(cache): add flag to only restore cache

This commit is contained in:
Ari Kishon 2023-08-31 12:29:33 +03:00 committed by GitHub
parent 5e21ff4d9b
commit 860bb139dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -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?)