mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-09-20 12:18:48 +00:00
Disable automatic cache saves for merge queues (#1056)
Amp-Thread-ID: https://ampcode.com/threads/T-01a0af68-f950-77dc-b9ae-9402987584c8 Closes: #1052 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
committed by
GitHub
parent
3377a30666
commit
a761a4e9af
+12
-1
@@ -101889,7 +101889,7 @@ function loadInputs() {
|
||||
const checksum = getInput("checksum");
|
||||
const enableCache = getEnableCache();
|
||||
const restoreCache3 = getInput("restore-cache") === "true";
|
||||
const saveCache2 = getInput("save-cache") === "true";
|
||||
const saveCache2 = getSaveCache();
|
||||
const cacheSuffix = getInput("cache-suffix") || "";
|
||||
const cacheLocalPath = getCacheLocalPath(
|
||||
workingDirectory,
|
||||
@@ -101999,6 +101999,17 @@ function getEnableCache() {
|
||||
}
|
||||
return enableCacheInput === "true";
|
||||
}
|
||||
function getSaveCache() {
|
||||
const saveCacheInput = getInput("save-cache");
|
||||
if (saveCacheInput === "auto") {
|
||||
if (process.env.GITHUB_EVENT_NAME === "merge_group") {
|
||||
info2("Cache saving is disabled for the merge_group event");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return saveCacheInput === "true";
|
||||
}
|
||||
function getToolBinDir(workingDirectory) {
|
||||
const toolBinDirInput = getInput("tool-bin-dir");
|
||||
if (toolBinDirInput !== "") {
|
||||
|
||||
Reference in New Issue
Block a user