Skip to content

Commit

Permalink
Skip proxy if no credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
marcogario committed Jan 24, 2025
1 parent f6d19ed commit f057e79
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/start-proxy-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/start-proxy-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/start-proxy-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,20 @@ async function runWrapper() {
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")}`,
);



const ca = generateCertificateAuthority();
const proxyAuth = getProxyAuth();

Expand Down

0 comments on commit f057e79

Please sign in to comment.