display proxy configuration

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-06-13 11:46:07 +02:00
parent 4b0752a2b1
commit dc0a85b056
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7

View file

@ -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;