Add inputs restore-cache and save-cache (#568)

Closes: #555
This commit is contained in:
Kevin Stillhammer
2025-09-14 14:55:08 +02:00
committed by GitHub
parent f67343ac2e
commit dc724a12b6
8 changed files with 149 additions and 9 deletions

View File

@ -11,12 +11,17 @@ import {
enableCache,
ignoreNothingToCache,
pruneCache as shouldPruneCache,
saveCache as shouldSaveCache,
} from "./utils/inputs";
export async function run(): Promise<void> {
try {
if (enableCache) {
await saveCache();
if (shouldSaveCache) {
await saveCache();
} else {
core.info("save-cache is false. Skipping save cache step.");
}
// node will stay alive if any promises are not resolved,
// which is a possibility if HTTP requests are dangling
// due to retries or timeouts. We know that if we got here