Skip proxy if no credentials

This commit is contained in:
Marco Gario
2025-01-24 21:31:24 +00:00
parent f6d19ed42e
commit 7d7758bb24
3 changed files with 11 additions and 1 deletions

View File

@@ -100,6 +100,10 @@ async function runWrapper() {
core.saveState("proxy-log-file", proxyLogFilePath);
// Get the configuration options
const credentials = (0, start_proxy_1.getCredentials)(logger, actionsUtil.getOptionalInput("registry_secrets"), actionsUtil.getOptionalInput("registries_credentials"), actionsUtil.getOptionalInput("language"));
if (credentials.length === 0) {
logger.info("No credentials found, skipping proxy setup.");
return;
}
logger.info(`Credentials loaded for the following registries:\n ${credentials
.map((c) => credentialToStr(c))
.join("\n")}`);