Skip to content

Commit 9a2e0d3

Browse files
authored
add runner OS in cache key (#220)
1 parent c00f302 commit 9a2e0d3

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

dist/restore/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -77314,6 +77314,9 @@ class CacheConfig {
7731477314
key += `-${job}`;
7731577315
}
7731677316
}
77317+
// Add runner OS to the key to avoid cross-contamination of cache
77318+
const runnerOS = external_os_default().type();
77319+
key += `-${runnerOS}`;
7731777320
self.keyPrefix = key;
7731877321
// Construct environment portion of the key:
7731977322
// This consists of a hash that considers the rust version

dist/save/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -77314,6 +77314,9 @@ class CacheConfig {
7731477314
key += `-${job}`;
7731577315
}
7731677316
}
77317+
// Add runner OS to the key to avoid cross-contamination of cache
77318+
const runnerOS = external_os_default().type();
77319+
key += `-${runnerOS}`;
7731777320
self.keyPrefix = key;
7731877321
// Construct environment portion of the key:
7731977322
// This consists of a hash that considers the rust version

src/config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ export class CacheConfig {
7171
}
7272
}
7373

74+
// Add runner OS to the key to avoid cross-contamination of cache
75+
const runnerOS = os.type();
76+
key += `-${runnerOS}`;
77+
7478
self.keyPrefix = key;
7579

7680
// Construct environment portion of the key:

0 commit comments

Comments
 (0)