3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-11-04 22:49:12 +00:00

feat: Rename input keys for job and hash suffixes to improve clarity and consistency

This commit is contained in:
Ryan-Brice 2025-10-31 16:09:12 +08:00
parent 70fec6c203
commit 5e55b88cf3
No known key found for this signature in database
GPG key ID: 3702BD1113AFDD13
2 changed files with 10 additions and 10 deletions

10
dist/restore/index.js vendored
View file

@ -85458,7 +85458,7 @@ class CacheConfig {
key += `-${inputKey}`;
}
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}`;
}
}
@ -85495,8 +85495,8 @@ 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)}`;
}
self.restoreKey = key;
@ -85597,8 +85597,8 @@ 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}`;
}

10
dist/save/index.js vendored
View file

@ -85458,7 +85458,7 @@ class CacheConfig {
key += `-${inputKey}`;
}
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}`;
}
}
@ -85495,8 +85495,8 @@ 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)}`;
}
self.restoreKey = key;
@ -85597,8 +85597,8 @@ 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}`;
}