Merge pull request #2672 from github/mbg/start-proxy/include-type-in-urls-output
This commit is contained in:
commit
fb65b6ce78
4 changed files with 10 additions and 4 deletions
5
lib/start-proxy-action.js
generated
5
lib/start-proxy-action.js
generated
|
|
@ -154,7 +154,10 @@ async function startProxy(binPath, config, logFilePath, logger) {
|
||||||
core.setOutput("proxy_ca_certificate", config.ca.cert);
|
core.setOutput("proxy_ca_certificate", config.ca.cert);
|
||||||
const registry_urls = config.all_credentials
|
const registry_urls = config.all_credentials
|
||||||
.filter((credential) => credential.url !== undefined)
|
.filter((credential) => credential.url !== undefined)
|
||||||
.map((credential) => credential.url);
|
.map((credential) => ({
|
||||||
|
type: credential.type,
|
||||||
|
url: credential.url,
|
||||||
|
}));
|
||||||
core.setOutput("proxy_urls", JSON.stringify(registry_urls));
|
core.setOutput("proxy_urls", JSON.stringify(registry_urls));
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -174,7 +174,10 @@ async function startProxy(
|
||||||
|
|
||||||
const registry_urls = config.all_credentials
|
const registry_urls = config.all_credentials
|
||||||
.filter((credential) => credential.url !== undefined)
|
.filter((credential) => credential.url !== undefined)
|
||||||
.map((credential) => credential.url);
|
.map((credential) => ({
|
||||||
|
type: credential.type,
|
||||||
|
url: credential.url,
|
||||||
|
}));
|
||||||
core.setOutput("proxy_urls", JSON.stringify(registry_urls));
|
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)}`);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ outputs:
|
||||||
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:
|
proxy_urls:
|
||||||
description: The URLs of the configured registries, as a JSON array.
|
description: A stringified JSON array of objects containing the types and URLs of the configured registries.
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node20
|
||||||
main: "../lib/start-proxy-action.js"
|
main: "../lib/start-proxy-action.js"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue