diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 634f90ed..a8f2f1db 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -64569,14 +64569,14 @@ function findPackageManager(id) { exports.findPackageManager = findPackageManager; /** * A function that generates a cache key to use. - * Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"". + * Format of the generated key will be "setup-java-${{ id }}-${{ fileHash }}"". * If there is no file matched to {@link PackageManager.path}, the generated key ends with a dash (-). * @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key} */ function computeCacheKey(packageManager) { return __awaiter(this, void 0, void 0, function* () { const hash = yield glob.hashFiles(packageManager.pattern.join('\n')); - return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${hash}`; + return `${CACHE_KEY_PREFIX}-${packageManager.id}-${hash}`; }); } exports.computeCacheKey = computeCacheKey; @@ -64594,7 +64594,7 @@ function restore(id) { throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`); } const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey, [ - `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}` + `${CACHE_KEY_PREFIX}-${id}` ]); if (matchedKey) { core.saveState(CACHE_MATCHED_KEY, matchedKey); diff --git a/dist/setup/index.js b/dist/setup/index.js index bb0ff4fa..591b7b01 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -18956,14 +18956,14 @@ function findPackageManager(id) { exports.findPackageManager = findPackageManager; /** * A function that generates a cache key to use. - * Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"". + * Format of the generated key will be "setup-java-${{ id }}-${{ fileHash }}"". * If there is no file matched to {@link PackageManager.path}, the generated key ends with a dash (-). * @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key} */ function computeCacheKey(packageManager) { return __awaiter(this, void 0, void 0, function* () { const hash = yield glob.hashFiles(packageManager.pattern.join('\n')); - return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${hash}`; + return `${CACHE_KEY_PREFIX}-${packageManager.id}-${hash}`; }); } exports.computeCacheKey = computeCacheKey; @@ -18981,7 +18981,7 @@ function restore(id) { throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`); } const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey, [ - `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}` + `${CACHE_KEY_PREFIX}-${id}` ]); if (matchedKey) { core.saveState(CACHE_MATCHED_KEY, matchedKey); diff --git a/src/cache.ts b/src/cache.ts index 4afcadbf..b277cd60 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -45,13 +45,13 @@ export function findPackageManager(id: string): PackageManager { /** * A function that generates a cache key to use. - * Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"". + * Format of the generated key will be "setup-java-${{ id }}-${{ fileHash }}"". * If there is no file matched to {@link PackageManager.path}, the generated key ends with a dash (-). * @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key} */ export async function computeCacheKey(packageManager: PackageManager) { const hash = await glob.hashFiles(packageManager.pattern.join('\n')); - return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${hash}`; + return `${CACHE_KEY_PREFIX}-${packageManager.id}-${hash}`; } /** @@ -73,7 +73,7 @@ export async function restore(id: string) { } const matchedKey = await cache.restoreCache(packageManager.path, primaryKey, [ - `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}` + `${CACHE_KEY_PREFIX}-${id}` ]); if (matchedKey) { core.saveState(CACHE_MATCHED_KEY, matchedKey);