mirror of
https://github.com/docker/build-push-action.git
synced 2024-11-26 20:59:04 +00:00
display proxy configuration
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
4b0752a2b1
commit
dc0a85b056
16
src/main.ts
16
src/main.ts
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user