Skip to content

Commit

Permalink
Use GITHUB_WORKFLOW to generate cache key (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlga authored Nov 7, 2023
1 parent 393c8c7 commit 9c00f9c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cargo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9c00f9c

Please sign in to comment.