3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-04-27 05:35:53 +00:00

key target by job id automatically

This commit is contained in:
Arpad Borsos 2020-10-03 17:33:09 +02:00
parent bd4d2a7017
commit 2bcc375de8
4 changed files with 20 additions and 15 deletions

View file

@ -54616,7 +54616,7 @@ const home = external_os_default().homedir();
const paths = {
index: external_path_default().join(home, ".cargo/registry/index"),
cache: external_path_default().join(home, ".cargo/registry/cache"),
git: external_path_default().join(home, ".cargo/git/db"),
// git: path.join(home, ".cargo/git/db"),
target: "target",
};
const RefKey = "GITHUB_REF";
@ -54634,6 +54634,10 @@ async function getCaches() {
if (targetKey) {
targetKey = `${targetKey}-`;
}
const job = process.env.GITHUB_JOB;
if (job) {
targetKey = `${job}-${targetKey}`;
}
const registryIndex = `v0-registry-index`;
const registryCache = `v0-registry-cache`;
const target = `v0-target-${targetKey}${rustKey}`;