2024-09-05 08:06:45 -04:00
|
|
|
import * as core from "@actions/core";
|
2024-09-07 14:11:25 +02:00
|
|
|
import path from "path";
|
2024-08-23 23:58:26 +02:00
|
|
|
|
2024-09-05 08:06:45 -04:00
|
|
|
export const version = core.getInput("version");
|
|
|
|
export const checkSum = core.getInput("checksum");
|
|
|
|
export const enableCache = core.getInput("enable-cache") === "true";
|
|
|
|
export const cacheSuffix = core.getInput("cache-suffix") || "";
|
2024-09-07 14:11:25 +02:00
|
|
|
export const cacheLocalPath = getCacheLocalPath();
|
2024-09-05 08:06:45 -04:00
|
|
|
export const githubToken = core.getInput("github-token");
|
|
|
|
export const cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
2024-09-07 14:11:25 +02:00
|
|
|
|
|
|
|
function getCacheLocalPath(): string {
|
|
|
|
const cacheLocalPathInput = core.getInput("cache-local-path");
|
|
|
|
if (cacheLocalPathInput !== "") {
|
|
|
|
return cacheLocalPathInput;
|
|
|
|
}
|
|
|
|
if (process.env.RUNNER_TEMP !== undefined) {
|
|
|
|
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
|
|
|
|
}
|
|
|
|
if (process.platform === "win32") {
|
|
|
|
return "D:\\a\\_temp\\setup-uv-cache";
|
|
|
|
}
|
|
|
|
return "/tmp/setup-uv-cache";
|
|
|
|
}
|