Skip to content

Commit

Permalink
display proxy configuration
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
CrazyMax committed Aug 9, 2023
1 parent 4b0752a commit dc0a85b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ actionsToolkit.run(
}
});

const dockerConfig = await Docker.configFile();
if (dockerConfig && dockerConfig.proxies) {
await core.group(`Proxy configuration found`, async () => {
for (const host in dockerConfig.proxies) {
let prefix = '';
if (dockerConfig.proxies.length > 1) {
prefix = ' ';
core.info(host);
}
for (const key in dockerConfig.proxies[host]) {
core.info(`${prefix}${key}: ${dockerConfig.proxies[host][key]}`);
}
}
});
}

if (!(await toolkit.buildx.isAvailable())) {
core.setFailed(`Docker buildx is required. See https://github.com/docker/setup-buildx-action to set up buildx.`);
return;
Expand Down

0 comments on commit dc0a85b

Please sign in to comment.