mirror of
https://github.com/docker/build-push-action
synced 2024-11-10 05:21:40 +00:00
display proxy configuration
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
4b0752a2b1
commit
dc0a85b056
1 changed files with 16 additions and 0 deletions
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())) {
|
if (!(await toolkit.buildx.isAvailable())) {
|
||||||
core.setFailed(`Docker buildx is required. See https://github.com/docker/setup-buildx-action to set up buildx.`);
|
core.setFailed(`Docker buildx is required. See https://github.com/docker/setup-buildx-action to set up buildx.`);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue