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

@@ -2,8 +2,8 @@ import * as crypto from "node:crypto";
import * as fs from "node:fs";
import * as stream from "node:stream";
import * as util from "node:util";
import * as core from "@actions/core";
import { create } from "@actions/glob";
import * as log from "../utils/logging";
/**
* Hashes files matching the given glob pattern.
@@ -19,7 +19,7 @@ export async function hashFiles(
): Promise<string> {
const globber = await create(pattern);
let hasMatch = false;
const writeDelegate = verbose ? core.info : core.debug;
const writeDelegate = verbose ? log.info : log.debug;
const result = crypto.createHash("sha256");
let count = 0;
for await (const file of globber.globGenerator()) {