Add a restore-only option to support pulling without saving a cache entry

This commit is contained in:
Jason T. Greene 2020-01-29 16:53:20 -05:00
parent e43776276f
commit e44e77f968
4 changed files with 56 additions and 1 deletions

View file

@ -18,6 +18,13 @@ async function run(): Promise<void> {
return;
}
if (core.getInput(Inputs.RestoreOnly) === "true") {
core.info(
"Cache action configured for restore-only, skipping save step"
);
return;
}
const state = utils.getCacheState();
// Inputs are re-evaluted before the post action, so we want the original key used for restore