mirror of
https://github.com/actions/setup-go.git
synced 2024-11-15 11:54:34 +08:00
Limit to Linux only
This commit is contained in:
parent
a4d10f0ea4
commit
4e0b6c77c6
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
@ -61155,8 +61155,8 @@ const restoreCache = (versionSpec, packageManager, cacheDependencyPath) => __awa
|
|||||||
if (!fileHash) {
|
if (!fileHash) {
|
||||||
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
|
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
|
||||||
}
|
}
|
||||||
const imageOS = process.env.ImageOS || 'self-hosted';
|
const linuxVersion = process.env.RUNNER_OS === 'Linux' ? `${process.env.ImageOS}-` : '';
|
||||||
const primaryKey = `setup-go-${platform}-${imageOS}-go-${versionSpec}-${fileHash}`;
|
const primaryKey = `setup-go-${platform}-${linuxVersion}go-${versionSpec}-${fileHash}`;
|
||||||
core.debug(`primary key is ${primaryKey}`);
|
core.debug(`primary key is ${primaryKey}`);
|
||||||
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
||||||
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey);
|
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey);
|
||||||
|
@ -29,8 +29,9 @@ export const restoreCache = async (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const imageOS = process.env.ImageOS || 'self-hosted';
|
const linuxVersion =
|
||||||
const primaryKey = `setup-go-${platform}-${imageOS}-go-${versionSpec}-${fileHash}`;
|
process.env.RUNNER_OS === 'Linux' ? `${process.env.ImageOS}-` : '';
|
||||||
|
const primaryKey = `setup-go-${platform}-${linuxVersion}go-${versionSpec}-${fileHash}`;
|
||||||
core.debug(`primary key is ${primaryKey}`);
|
core.debug(`primary key is ${primaryKey}`);
|
||||||
|
|
||||||
core.saveState(State.CachePrimaryKey, primaryKey);
|
core.saveState(State.CachePrimaryKey, primaryKey);
|
||||||
|
Loading…
Reference in New Issue
Block a user