From d6edeec1a5f850d39c3c9a79026448017650f697 Mon Sep 17 00:00:00 2001 From: mlga Date: Tue, 7 Nov 2023 18:54:53 +0100 Subject: [PATCH] Use GITHUB_WORKFLOW to generate cache key --- src/cargo.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cargo.ts b/src/cargo.ts index 4a1b178..172ab0c 100644 --- a/src/cargo.ts +++ b/src/cargo.ts @@ -136,6 +136,13 @@ export async function getPrimaryCacheKey() { core.debug(`Hashing target profile = ${cacheTarget}`); hasher.update(cacheTarget); + const workflow = process.env.GITHUB_WORKFLOW; + + if (workflow) { + core.debug(`Hashing GITHUB_WORKFLOW = ${workflow}`); + hasher.update(workflow); + } + const job = process.env.GITHUB_JOB; if (job) {