Skip to content

Commit f966f59

Browse files
committed
Better opam download cache key
Signed-off-by: Sora Morimoto <sora@morimoto.io>
1 parent e9079d6 commit f966f59

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/setup-ocaml/src/cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ async function composeOpamDownloadCacheKeys() {
7070
const isWin = PLATFORM === "windows";
7171
const ocamlCompiler = await RESOLVED_COMPILER;
7272
const repositoryUrls = OPAM_REPOSITORIES.map(([_, value]) => value).join();
73-
const plainKey = [isWin, ocamlCompiler, repositoryUrls].join();
73+
const { runId, workflow, job } = github.context;
74+
const plainKey = [isWin, job, ocamlCompiler, repositoryUrls, workflow].join();
7475
const hash = crypto.createHash("sha256").update(plainKey).digest("hex");
75-
const { runId } = github.context;
7676
const key = `${CACHE_PREFIX}-setup-ocaml-opam-download-${hash}-${runId}`;
7777
const restoreKeys = [
7878
key,

0 commit comments

Comments
 (0)