Add manifest-file input (#352)

This commit is contained in:
Kevin Stillhammer
2026-04-11 19:14:05 +02:00
committed by GitHub
parent 535554df96
commit 9b8caf6c41
16 changed files with 2129 additions and 4213 deletions
+6
View File
@@ -1,3 +1,9 @@
export const REPO = "ruff";
export const OWNER = "astral-sh";
export const TOOL_CACHE_NAME = "ruff";
export const VERSIONS_MANIFEST_URL =
"https://raw.githubusercontent.com/astral-sh/versions/main/v1/ruff.ndjson";
export const GITHUB_RELEASES_PREFIX =
"https://github.com/astral-sh/ruff/releases/download/";
export const ASTRAL_MIRROR_PREFIX =
"https://releases.astral.sh/github/ruff/releases/download/";
+21
View File
@@ -0,0 +1,21 @@
import { ProxyAgent, type RequestInit, fetch as undiciFetch } from "undici";
export function getProxyAgent() {
const httpProxy = process.env.HTTP_PROXY || process.env.http_proxy;
if (httpProxy) {
return new ProxyAgent(httpProxy);
}
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
if (httpsProxy) {
return new ProxyAgent(httpsProxy);
}
return undefined;
}
export const fetch = async (url: string, opts: RequestInit) =>
await undiciFetch(url, {
dispatcher: getProxyAgent(),
...opts,
});
+1
View File
@@ -6,3 +6,4 @@ export const githubToken = core.getInput("github-token");
export const args = core.getInput("args");
export const src = core.getInput("src");
export const versionFile = core.getInput("version-file");
export const manifestFile = core.getInput("manifest-file");