mirror of
https://github.com/Swatinem/rust-cache
synced 2025-11-10 01:32:03 +00:00
Refactor cache key logic to use input for job key
Replace direct use of 'useJobKey' property with input retrieval for flexibility.
This commit is contained in:
parent
c33320fb91
commit
5788d5f736
1 changed files with 1 additions and 3 deletions
|
|
@ -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}`;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue