mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Add registry URLs as output to the start-proxy Action
This commit is contained in:
4
lib/start-proxy-action.js
generated
4
lib/start-proxy-action.js
generated
@@ -152,6 +152,10 @@ async function startProxy(binPath, config, logFilePath, logger) {
|
|||||||
core.setOutput("proxy_host", host);
|
core.setOutput("proxy_host", host);
|
||||||
core.setOutput("proxy_port", port.toString());
|
core.setOutput("proxy_port", port.toString());
|
||||||
core.setOutput("proxy_ca_certificate", config.ca.cert);
|
core.setOutput("proxy_ca_certificate", config.ca.cert);
|
||||||
|
const registry_urls = config.all_credentials
|
||||||
|
.filter((credential) => credential.url !== undefined)
|
||||||
|
.map((credential) => credential.url);
|
||||||
|
core.setOutput("proxy_urls", JSON.stringify(registry_urls));
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
|
core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -171,6 +171,11 @@ async function startProxy(
|
|||||||
core.setOutput("proxy_host", host);
|
core.setOutput("proxy_host", host);
|
||||||
core.setOutput("proxy_port", port.toString());
|
core.setOutput("proxy_port", port.toString());
|
||||||
core.setOutput("proxy_ca_certificate", config.ca.cert);
|
core.setOutput("proxy_ca_certificate", config.ca.cert);
|
||||||
|
|
||||||
|
const registry_urls = config.all_credentials
|
||||||
|
.filter((credential) => credential.url !== undefined)
|
||||||
|
.map((credential) => credential.url);
|
||||||
|
core.setOutput("proxy_urls", JSON.stringify(registry_urls));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
|
core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ outputs:
|
|||||||
description: The port of the proxy
|
description: The port of the proxy
|
||||||
proxy_ca_certificate:
|
proxy_ca_certificate:
|
||||||
description: The proxy's internal CA certificate in PEM format
|
description: The proxy's internal CA certificate in PEM format
|
||||||
|
proxy_urls:
|
||||||
|
description: The URLs of the configured registries, as a JSON array.
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node20
|
||||||
main: "../lib/start-proxy-action.js"
|
main: "../lib/start-proxy-action.js"
|
||||||
|
|||||||
Reference in New Issue
Block a user