Skip to content

Commit

Permalink
Merge pull request #906 from ocaml/better-opam-download-cache-key
Browse files Browse the repository at this point in the history
Better opam download cache key
  • Loading branch information
smorimoto authored Dec 5, 2024
2 parents e9079d6 + f966f59 commit c0fbcc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/setup-ocaml/src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ async function composeOpamDownloadCacheKeys() {
const isWin = PLATFORM === "windows";
const ocamlCompiler = await RESOLVED_COMPILER;
const repositoryUrls = OPAM_REPOSITORIES.map(([_, value]) => value).join();
const plainKey = [isWin, ocamlCompiler, repositoryUrls].join();
const { runId, workflow, job } = github.context;
const plainKey = [isWin, job, ocamlCompiler, repositoryUrls, workflow].join();
const hash = crypto.createHash("sha256").update(plainKey).digest("hex");
const { runId } = github.context;
const key = `${CACHE_PREFIX}-setup-ocaml-opam-download-${hash}-${runId}`;
const restoreKeys = [
key,
Expand Down

0 comments on commit c0fbcc4

Please sign in to comment.