From 5788d5f7368ec6b1c4f9f0a8983f3f745bf88916 Mon Sep 17 00:00:00 2001 From: Ryan Brice <182604967+Ryan-Brice@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:07:10 +0800 Subject: [PATCH] Refactor cache key logic to use input for job key Replace direct use of 'useJobKey' property with input retrieval for flexibility. --- src/config.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/config.ts b/src/config.ts index 4837709..d3ed31b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -24,8 +24,6 @@ export class CacheConfig { public cacheKey = ""; /** The secondary (restore) key that only contains the prefix and environment */ public restoreKey = ""; - /** If the 'GITHIB_JOB' environemnt variable should be added to the cache name */ - public useJobKey = true; /** Whether to cache CARGO_HOME/.bin */ public cacheBin: boolean = true; @@ -71,7 +69,7 @@ export class CacheConfig { } const job = process.env.GITHUB_JOB; - if ((job) && core.useJobKey == true) { + if ((job) && core.getInput("use-job-key").toLowerCase() == "true") { key += `-${job}`; } }