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 c4dc78f
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 c4dc78f

Please sign in to comment.