feat: include a hash of deno.lock files in the cache key automatically (#98)

(cherry picked from commit 3169cf993b)
This commit is contained in:
David Sherret
2025-05-14 18:58:13 +02:00
committed by Leo Kettmeir
parent aa0fea114b
commit 609c005598
12 changed files with 1993 additions and 830 deletions
+6 -1
View File
@@ -20,6 +20,11 @@ function exit(message: string): never {
process.exit();
}
function isCachingEnabled() {
return core.getInput("cache") === "true" ||
core.getInput("cache-hash").length > 0;
}
async function main() {
try {
const denoVersionFile = core.getInput("deno-version-file");
@@ -57,7 +62,7 @@ async function main() {
core.info("Installation complete.");
if (core.getInput("cache") === "true") {
if (isCachingEnabled()) {
const { restoreCache } = await import("./cache.ts");
await restoreCache(core.getInput("cache-hash"));
}