diff --git a/dist/setup-pdm.js b/dist/setup-pdm.js index 178f70d..6e54665 100644 --- a/dist/setup-pdm.js +++ b/dist/setup-pdm.js @@ -91048,8 +91048,8 @@ var cache3 = __toESM(require_cache2()); var import_glob = __toESM(require_glob2()); async function calculateCacheKeys(pythonVersion, cacheDependencyPath) { const hash = await (0, import_glob.hashFiles)(cacheDependencyPath); - const primaryKey = `setup-pdm-${import_node_process3.default.env.RUNNER_OS}-python-${pythonVersion}-${hash}`; - const restoreKey = `setup-pdm-${import_node_process3.default.env.RUNNER_OS}-python-${pythonVersion}-`; + const primaryKey = `setup-pdm-${import_node_process3.default.env.RUNNER_OS}-${import_node_process3.default.env.RUNNER_ARCH}-python-${pythonVersion}-${hash}`; + const restoreKey = `setup-pdm-${import_node_process3.default.env.RUNNER_OS}-${import_node_process3.default.env.RUNNER_ARCH}-python-${pythonVersion}-`; return { primaryKey, restoreKeys: [restoreKey] }; } async function cacheDependencies(pdmBin, pythonVersion) { diff --git a/src/caches.ts b/src/caches.ts index 690b26a..fc3b666 100644 --- a/src/caches.ts +++ b/src/caches.ts @@ -7,8 +7,8 @@ import { getOutput } from './utils' async function calculateCacheKeys(pythonVersion: string, cacheDependencyPath: string): Promise<{ primaryKey: string, restoreKeys: string[] }> { const hash = await hashFiles(cacheDependencyPath) - const primaryKey = `setup-pdm-${process.env.RUNNER_OS}-python-${pythonVersion}-${hash}` - const restoreKey = `setup-pdm-${process.env.RUNNER_OS}-python-${pythonVersion}-` + const primaryKey = `setup-pdm-${process.env.RUNNER_OS}-${process.env.RUNNER_ARCH}-python-${pythonVersion}-${hash}` + const restoreKey = `setup-pdm-${process.env.RUNNER_OS}-${process.env.RUNNER_ARCH}-python-${pythonVersion}-` return { primaryKey, restoreKeys: [restoreKey] } }