Add quiet input to suppress info-level log output (#898)

## Summary

Adds a new `quiet` input (default: `false`) that suppresses `info`-level
log output when set to `true`. Only warnings and errors are shown.

Contributes to: #868
This commit is contained in:
Kevin Stillhammer
2026-05-31 21:13:30 +02:00
committed by GitHub
parent e07f2ac4b7
commit a92cb43098
18 changed files with 705 additions and 612 deletions

View File

@@ -8,6 +8,7 @@ import {
TOOL_CACHE_NAME,
VERSIONS_MANIFEST_URL,
} from "../utils/constants";
import * as log from "../utils/logging";
import type { Architecture, Platform } from "../utils/platforms";
import { validateChecksum } from "./checksum/checksum";
import { getArtifact } from "./manifest";
@@ -73,7 +74,7 @@ export async function downloadVersion(
throw err;
}
core.warning(
log.warning(
`Failed to download from mirror, falling back to GitHub Releases: ${(err as Error).message}`,
);
@@ -123,7 +124,7 @@ async function downloadArtifact(
checksum: string | undefined,
githubToken: string | undefined,
): Promise<{ version: string; cachedToolDir: string }> {
core.info(`Downloading uv from "${downloadUrl}" ...`);
log.info(`Downloading uv from "${downloadUrl}" ...`);
const downloadPath = await tc.downloadTool(
downloadUrl,
undefined,
@@ -139,7 +140,7 @@ async function downloadArtifact(
// so this may fail if another tar, like gnu tar, ends up being used.
uvDir = await tc.extractTar(downloadPath, undefined, "x");
} catch (err) {
core.info(
log.info(
`Extracting with tar failed, falling back to zip extraction: ${(err as Error).message}`,
);
const extension = getExtension(platform);