diff --git a/src/cache.ts b/src/cache.ts index 85b5b79..15c62b4 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -72,6 +72,9 @@ async function buildCacheKeys(): Promise { } export async function restoreCache(): Promise { + if (core.getInput(`skip-cache`, { required: true }).trim() == "true") + return + if (!utils.isValidEvent()) { utils.logWarning( `Event Validation Error: The event type ${process.env[Events.Key]} is not supported because it's not tied to a branch or tag ref.` @@ -112,6 +115,9 @@ export async function restoreCache(): Promise { } export async function saveCache(): Promise { + if (core.getInput(`skip-cache`, { required: true }).trim() == "true") + return + // Validate inputs, this can cause task failure if (!utils.isValidEvent()) { utils.logWarning(