Prefix cache key with protocol version

This will ensure that incompatiblee cache entries generated by previous action releases
will not be used.
This commit is contained in:
Daz DeBoer 2021-10-16 08:33:42 -06:00
parent 0eb5996567
commit 263f84178a
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
5 changed files with 6 additions and 6 deletions

2
dist/main/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/post/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -18,8 +18,8 @@ export function isCacheDebuggingEnabled(): boolean {
}
function generateCacheKey(cacheName: string): CacheKey {
// Prefix can be used to force change all cache keys
const cacheKeyPrefix = process.env['CACHE_KEY_PREFIX'] || ''
// Prefix can be used to force change all cache keys (defaults to cache protocol version)
const cacheKeyPrefix = process.env['CACHE_KEY_PREFIX'] || 'v2-'
// At the most general level, share caches for all executions on the same OS
const runnerOs = process.env['RUNNER_OS'] || ''