Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include registry type in proxy_urls output #2672

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/start-proxy-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/start-proxy-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/start-proxy-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ async function startProxy(

const registry_urls = config.all_credentials
.filter((credential) => credential.url !== undefined)
.map((credential) => credential.url);
.map((credential) => ({
type: credential.type,
url: credential.url,
}));
Comment on lines +177 to +180
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the shape of the proxy_urls output. Previously, it was just an array of strings. Is there anything that consumes proxy_urls that will break because of this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. I only added this before Christmas for a feature I am working on, and I don't expect anyone else to be using it yet. This action is also marked as experimental, so I wouldn't worry about this potentially being a breaking change externally.

core.setOutput("proxy_urls", JSON.stringify(registry_urls));
} catch (error) {
core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
Expand Down
2 changes: 1 addition & 1 deletion start-proxy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ outputs:
proxy_ca_certificate:
description: The proxy's internal CA certificate in PEM format
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:
using: node20
main: "../lib/start-proxy-action.js"
Expand Down
Loading