mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-05-17 14:44:46 +00:00
Default to enable-cache: true on GitHub hosted runners (#193)
Closes: #54
This commit is contained in:
parent
3460fe1a9a
commit
e3017a763c
6 changed files with 51 additions and 10 deletions
9
dist/save-cache/index.js
generated
vendored
9
dist/save-cache/index.js
generated
vendored
|
@ -91803,7 +91803,7 @@ const node_path_1 = __importDefault(__nccwpck_require__(6760));
|
|||
exports.version = core.getInput("version");
|
||||
exports.pythonVersion = core.getInput("python-version");
|
||||
exports.checkSum = core.getInput("checksum");
|
||||
exports.enableCache = core.getInput("enable-cache") === "true";
|
||||
exports.enableCache = getEnableCache();
|
||||
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
||||
exports.cacheLocalPath = getCacheLocalPath();
|
||||
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
||||
|
@ -91812,6 +91812,13 @@ exports.ignoreNothingToCache = core.getInput("ignore-nothing-to-cache") === "tru
|
|||
exports.toolBinDir = getToolBinDir();
|
||||
exports.toolDir = getToolDir();
|
||||
exports.githubToken = core.getInput("github-token");
|
||||
function getEnableCache() {
|
||||
const enableCacheInput = core.getInput("enable-cache");
|
||||
if (enableCacheInput === "auto") {
|
||||
return process.env.RUNNER_ENVIRONMENT === "github-hosted";
|
||||
}
|
||||
return enableCacheInput === "true";
|
||||
}
|
||||
function getToolBinDir() {
|
||||
const toolBinDirInput = core.getInput("tool-bin-dir");
|
||||
if (toolBinDirInput !== "") {
|
||||
|
|
9
dist/setup/index.js
generated
vendored
9
dist/setup/index.js
generated
vendored
|
@ -99334,7 +99334,7 @@ const node_path_1 = __importDefault(__nccwpck_require__(6760));
|
|||
exports.version = core.getInput("version");
|
||||
exports.pythonVersion = core.getInput("python-version");
|
||||
exports.checkSum = core.getInput("checksum");
|
||||
exports.enableCache = core.getInput("enable-cache") === "true";
|
||||
exports.enableCache = getEnableCache();
|
||||
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
||||
exports.cacheLocalPath = getCacheLocalPath();
|
||||
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
||||
|
@ -99343,6 +99343,13 @@ exports.ignoreNothingToCache = core.getInput("ignore-nothing-to-cache") === "tru
|
|||
exports.toolBinDir = getToolBinDir();
|
||||
exports.toolDir = getToolDir();
|
||||
exports.githubToken = core.getInput("github-token");
|
||||
function getEnableCache() {
|
||||
const enableCacheInput = core.getInput("enable-cache");
|
||||
if (enableCacheInput === "auto") {
|
||||
return process.env.RUNNER_ENVIRONMENT === "github-hosted";
|
||||
}
|
||||
return enableCacheInput === "true";
|
||||
}
|
||||
function getToolBinDir() {
|
||||
const toolBinDirInput = core.getInput("tool-bin-dir");
|
||||
if (toolBinDirInput !== "") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue