3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-11-13 19:21:16 +00:00

feat: Update cache key configuration option names for better clarity for their intended functionality

This commit is contained in:
Ryan-Brice 2025-10-31 16:07:47 +08:00
parent c21ebd7031
commit 70fec6c203
No known key found for this signature in database
GPG key ID: 3702BD1113AFDD13
3 changed files with 15 additions and 13 deletions

View file

@ -69,7 +69,7 @@ export class CacheConfig {
}
const job = process.env.GITHUB_JOB;
if ((job) && core.getInput("use-job-key").toLowerCase() == "true") {
if ((job) && core.getInput("add-job-id-key").toLowerCase() == "true") {
key += `-${job}`;
}
}
@ -116,8 +116,8 @@ export class CacheConfig {
self.keyEnvs = keyEnvs;
// Add job hash suffix if 'add-job-hash' is true
if (core.getInput("add-job-hash").toLowerCase() == "true") {
// Add job hash suffix if 'add-rust-environment-hash-key' is true
if (core.getInput("add-rust-environment-hash-key").toLowerCase() == "true") {
key += `-${digest(hasher)}`;
}
@ -244,8 +244,8 @@ export class CacheConfig {
keyFiles.push(...parsedKeyFiles);
self.keyFiles = sort_and_uniq(keyFiles);
// Add lock hash suffix if 'add-job-hash' is true
if (core.getInput("add-job-hash").toLowerCase() == "true") {
// Add lock hash suffix if 'add-rust-environment-hash-key' is true
if (core.getInput("add-rust-environment-hash-key").toLowerCase() == "true") {
let lockHash = digest(hasher);
key += `-${lockHash}`;
}