Purge cache in cache key (#423)

Fixes: #416
This commit is contained in:
Kevin Stillhammer 2025-05-23 09:43:52 +02:00 committed by GitHub
parent b3d7ca7ac0
commit e3d2ea5ff3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 16 deletions

View file

@ -4,6 +4,7 @@ import {
cacheDependencyGlob,
cacheLocalPath,
cacheSuffix,
pruneCache,
pythonVersion as pythonVersionInput,
workingDirectory,
} from "../utils/inputs";
@ -55,7 +56,8 @@ async function computeKeys(): Promise<string> {
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
const pythonVersion = await getPythonVersion();
const platform = await getPlatform();
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
const pruned = pruneCache ? "-pruned" : "";
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${pruned}${cacheDependencyPathHash}${suffix}`;
}
async function getPythonVersion(): Promise<string> {