diff --git a/index.ts b/index.ts index 1a14e99..83442ef 100644 --- a/index.ts +++ b/index.ts @@ -28,13 +28,14 @@ async function main() { process.chdir(workingDirectory); const platform = os.platform(); + const arch = os.arch(); const installPath = ["~/.esy/source"]; - const installKey = `source-${platform}-${cacheKey}`; + const installKey = `source-${platform}-${arch}-${cacheKey}`; core.startGroup("Restoring install cache"); const installCacheKey = await cache.restoreCache( installPath, installKey, - [] + [], ); if (installCacheKey) { console.log("Restored the install cache"); @@ -55,14 +56,14 @@ async function main() { .pop(); const depsPath = [path.join(ESY_FOLDER, esy3!, "i")]; - const buildKey = `build-${platform}-${cacheKey}`; - const restoreKeys = [`build-${platform}-`, `build-`]; + const buildKey = `build-${platform}-${arch}-${cacheKey}`; + const restoreKeys = [`build-${platform}-${arch}-`, `build-`]; core.startGroup("Restoring build cache"); const buildCacheKey = await cache.restoreCache( depsPath, buildKey, - restoreKeys + restoreKeys, ); if (buildCacheKey) { console.log("Restored the build cache");