mirror of
https://github.com/actions/setup-python.git
synced 2026-06-24 01:00:57 +03:00
Add RHEL support and include Linux distro in cache keys (#1323)
* Add RHEL support for manifest matching and OS detection * update dist * make cache keys distro-aware and key RHEL by major version * Normalize RHEL OS detection and improve cache key consistency * Refactor OS info retrieval to use getOSInfo and handle null cases for improved reliability
This commit is contained in:
@@ -46,8 +46,9 @@ class PoetryCache extends CacheDistributor {
|
||||
|
||||
protected async computeKeys() {
|
||||
const hash = await glob.hashFiles(this.patterns);
|
||||
const osSegment = await this.getLinuxInfoKeySegment();
|
||||
// "v2" is here to invalidate old caches of this cache distributor, which were created broken:
|
||||
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`;
|
||||
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}${osSegment}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`;
|
||||
const restoreKey = undefined;
|
||||
return {
|
||||
primaryKey,
|
||||
|
||||
Reference in New Issue
Block a user