mirror of
https://github.com/actions/setup-go.git
synced 2025-06-30 13:13:43 +00:00
feat: Add cache-key-prefix
option
This commit is contained in:
parent
41c2024c46
commit
089c1d9041
4 changed files with 31 additions and 2 deletions
3
dist/setup/index.js
vendored
3
dist/setup/index.js
vendored
|
@ -63043,7 +63043,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 cacheKeyPrefix = core.getInput('cache-key-prefix') || '';
|
||||
const primaryKey = `${cacheKeyPrefix}setup-go-${platform}-go-${versionSpec}-${fileHash}`;
|
||||
core.debug(`primary key is ${primaryKey}`);
|
||||
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
||||
const cacheKey = yield cache.restoreCache(cachePaths, primaryKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue