feat: Add cache-key-prefix option

This commit is contained in:
erezrokah 2023-04-05 16:19:37 +03:00
parent 41c2024c46
commit 089c1d9041
No known key found for this signature in database
GPG key ID: EA610DCA9B4C557B
4 changed files with 31 additions and 2 deletions

View file

@ -29,7 +29,8 @@ export const restoreCache = async (
);
}
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(State.CachePrimaryKey, primaryKey);