Skip to content

Commit

Permalink
Add imageOS to primaryKey
Browse files Browse the repository at this point in the history
  • Loading branch information
dsame committed Jun 6, 2023
1 parent 0e6baa5 commit aeb9429
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/setup/index.js
Expand Up @@ -61155,7 +61155,8 @@ const restoreCache = (versionSpec, packageManager, cacheDependencyPath) => __awa
if (!fileHash) {
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
}
const primaryKey = `setup-go-${platform}-go-${versionSpec}-${fileHash}`;
const imageOS = process.env.ImageOS || 'self-hosted';
const primaryKey = `setup-go-${platform}-${imageOS}-go-${versionSpec}-${fileHash}`;
core.debug(`primary key is ${primaryKey}`);
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey);
Expand Down
3 changes: 2 additions & 1 deletion src/cache-restore.ts
Expand Up @@ -29,7 +29,8 @@ export const restoreCache = async (
);
}

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

core.saveState(State.CachePrimaryKey, primaryKey);
Expand Down

0 comments on commit aeb9429

Please sign in to comment.