From ec939a8c108535d42fb11078488cd2e772fa1a45 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Mon, 20 Jun 2022 17:39:25 -0600 Subject: [PATCH] Disable caching when feature not available --- src/cache-utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cache-utils.ts b/src/cache-utils.ts index 50a6600..683452b 100644 --- a/src/cache-utils.ts +++ b/src/cache-utils.ts @@ -25,6 +25,9 @@ const CACHE_KEY_JOB_INSTANCE_VAR = 'GRADLE_BUILD_ACTION_CACHE_KEY_JOB_INSTANCE' const CACHE_KEY_JOB_EXECUTION_VAR = 'GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION' export function isCacheDisabled(): boolean { + if (!cache.isFeatureAvailable()) { + return true + } return core.getBooleanInput(CACHE_DISABLED_PARAMETER) }