Skip to content

Commit 13a76d3

Browse files
committed
feat: add arch to cache key
1 parent 6bd8b7f commit 13a76d3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/setup/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -93479,7 +93479,8 @@ const restoreCache = (cacheDependencyPath) => __awaiter(void 0, void 0, void 0,
9347993479
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
9348093480
}
9348193481
const platform = process.env.RUNNER_OS;
93482-
const primaryKey = `dotnet-cache-${platform}-${fileHash}`;
93482+
const arch = process.arch;
93483+
const primaryKey = `dotnet-cache-${platform}-${arch}-${fileHash}`;
9348393484
core.debug(`primary key is ${primaryKey}`);
9348493485
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
9348593486
const { 'global-packages': cachePath } = yield (0, cache_utils_1.getNuGetFolderPath)();

src/cache-restore.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export const restoreCache = async (cacheDependencyPath?: string) => {
1717
}
1818

1919
const platform = process.env.RUNNER_OS;
20-
const primaryKey = `dotnet-cache-${platform}-${fileHash}`;
20+
const arch = process.arch;
21+
const primaryKey = `dotnet-cache-${platform}-${arch}-${fileHash}`;
2122
core.debug(`primary key is ${primaryKey}`);
2223

2324
core.saveState(State.CachePrimaryKey, primaryKey);

0 commit comments

Comments
 (0)