3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-04-29 14:45:53 +00:00

introduce a new sharedKey option

fixes #6
This commit is contained in:
Arpad Borsos 2021-01-28 18:25:11 +01:00
parent 2639a56bb8
commit be44a3e6ff
3 changed files with 18 additions and 7 deletions

View file

@ -49,14 +49,19 @@ export async function getCacheConfig(): Promise<CacheConfig> {
let key = `v0-rust-`;
let inputKey = core.getInput("key");
if (inputKey) {
key += `${inputKey}-`;
}
const sharedKey = core.getInput("sharedKey");
if (sharedKey) {
key += `${sharedKey}-`;
} else {
const inputKey = core.getInput("key");
if (inputKey) {
key += `${inputKey}-`;
}
const job = process.env.GITHUB_JOB;
if (job) {
key += `${job}-`;
const job = process.env.GITHUB_JOB;
if (job) {
key += `${job}-`;
}
}
key += await getRustKey();