From dc0a85b056d0f9e409be6fe5bb2d128d0046b438 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 13 Jun 2023 11:46:07 +0200 Subject: [PATCH] display proxy configuration Signed-off-by: CrazyMax --- src/main.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main.ts b/src/main.ts index 5c236e2..286e594 100644 --- a/src/main.ts +++ b/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;