From c6311d74ed3b4892459fd737b034e8c3ed03f87b Mon Sep 17 00:00:00 2001 From: Jacob Hummer Date: Tue, 30 Jan 2024 20:08:17 -0600 Subject: [PATCH] Update main.ts --- src/main.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index c5d6c46..54361ed 100644 --- a/src/main.ts +++ b/src/main.ts @@ -37,6 +37,7 @@ core.debug(`Resolved version: v${version}`); if (!version) throw new DOMException(`${versionRaw} resolved to ${version}`); const workflowCache = core.getBooleanInput("cache"); +const primaryKey = `hayagriva-${version}`; let found = tc.find("hayagriva", version); let cacheHit = !!found; @@ -46,8 +47,6 @@ if (!found) { install_hayagriva: { if (workflowCache) { - const primaryKey = `hayagriva-${version}`; - core.saveState("cache-key", primaryKey); const hitKey = await cache.restoreCache([cacheDir], primaryKey); if (hitKey) { found = cacheDir; @@ -61,7 +60,6 @@ if (!found) { })`cargo binstall hayagriva --version ${version} --force -y --install-path ${cacheDir}`; if (workflowCache) { - const primaryKey = core.getState("cache-key"); await cache.saveCache([cacheDir], primaryKey); } }