Files
ruff-action/src/utils/inputs.ts
T
Kevin Stillhammer 278981a28c Add option to skip Astral mirror downloads (#387)
## 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
2026-07-05 10:17:44 +00:00

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);
}