Skip to content

Commit a4d10f0

Browse files
committed
Add imageOS to primaryKey
#368
1 parent 992f068 commit a4d10f0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: dist/setup/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -61155,7 +61155,8 @@ const restoreCache = (versionSpec, packageManager, cacheDependencyPath) => __awa
6115561155
if (!fileHash) {
6115661156
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
6115761157
}
61158-
const primaryKey = `setup-go-${platform}-go-${versionSpec}-${fileHash}`;
61158+
const imageOS = process.env.ImageOS || 'self-hosted';
61159+
const primaryKey = `setup-go-${platform}-${imageOS}-go-${versionSpec}-${fileHash}`;
6115961160
core.debug(`primary key is ${primaryKey}`);
6116061161
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
6116161162
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey);

Diff for: src/cache-restore.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export const restoreCache = async (
2929
);
3030
}
3131

32-
const primaryKey = `setup-go-${platform}-go-${versionSpec}-${fileHash}`;
32+
const imageOS = process.env.ImageOS || 'self-hosted';
33+
const primaryKey = `setup-go-${platform}-${imageOS}-go-${versionSpec}-${fileHash}`;
3334
core.debug(`primary key is ${primaryKey}`);
3435

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

0 commit comments

Comments
 (0)