Skip to content

Commit 62192f8

Browse files
committed
Add registry URLs as output to the start-proxy Action
1 parent dd75594 commit 62192f8

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

lib/start-proxy-action.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/start-proxy-action.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ async function startProxy(
171171
core.setOutput("proxy_host", host);
172172
core.setOutput("proxy_port", port.toString());
173173
core.setOutput("proxy_ca_certificate", config.ca.cert);
174+
175+
const registry_urls = config.all_credentials
176+
.filter((credential) => credential.url !== undefined)
177+
.map((credential) => credential.url);
178+
core.setOutput("proxy_urls", JSON.stringify(registry_urls));
174179
} catch (error) {
175180
core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
176181
}

start-proxy/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ outputs:
2323
description: The port of the proxy
2424
proxy_ca_certificate:
2525
description: The proxy's internal CA certificate in PEM format
26+
proxy_urls:
27+
description: The URLs of the configured registries, as a JSON array.
2628
runs:
2729
using: node20
2830
main: "../lib/start-proxy-action.js"

0 commit comments

Comments
 (0)