Skip to content

Commit

Permalink
Include RUNNER_ARCH in cache key
Browse files Browse the repository at this point in the history
Previously, including RUNNER_OS was enough to prevent leaking incompatible
content between Gradle User Homes. With the introduction of macos-14,
we now need to differentiate between different runner architectures as well.

Fixes #138
  • Loading branch information
bigdaz committed Jul 20, 2024
1 parent 46308b9 commit e6688f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sources/src/caching/cache-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export function getCacheKeyBase(cacheName: string, cacheProtocolVersion: string)

function getCacheKeyEnvironment(): string {
const runnerOs = process.env['RUNNER_OS'] || ''
return process.env[CACHE_KEY_OS_VAR] || runnerOs
const runnerArch = process.env['RUNNER_ARCH'] || ''
return process.env[CACHE_KEY_OS_VAR] || `${runnerOs}-${runnerArch}`
}

function getCacheKeyJob(): string {
Expand Down

0 comments on commit e6688f3

Please # to comment.