diff --git a/src/config.ts b/src/config.ts index e592916..4837709 100644 --- a/src/config.ts +++ b/src/config.ts @@ -24,6 +24,8 @@ 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; @@ -69,7 +71,7 @@ export class CacheConfig { } const job = process.env.GITHUB_JOB; - if (job) { + if ((job) && core.useJobKey == true) { key += `-${job}`; } }