mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-11-25 21:41:57 +00:00
## Summary - add `download-from-astral-mirror` input defaulting to `true` - skip mirror URL rewriting and download directly from GitHub Releases when disabled - document the input and add unit coverage Fixes #384 Refs: pi-session 019f31bc-bd1c-7276-9b4e-9734fa0aa367 ## Testing - npm run build - npm run check - npm run test:unit
21 lines
679 B
TypeScript
21 lines
679 B
TypeScript
import * as core from "@actions/core";
|
|
|
|
export const version = core.getInput("version");
|
|
export const checkSum = core.getInput("checksum");
|
|
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");
|
|
export const downloadFromAstralMirror = getBooleanInput(
|
|
"download-from-astral-mirror",
|
|
true,
|
|
);
|
|
|
|
function getBooleanInput(name: string, defaultValue: boolean): boolean {
|
|
if (core.getInput(name) === "") {
|
|
return defaultValue;
|
|
}
|
|
return core.getBooleanInput(name);
|
|
}
|