Skip to content

build/bake: skip registry identity validation without registry login - #266

Open
crazy-max wants to merge 3 commits into
docker:mainfrom
crazy-max:registry-identities-login-gate
Open

build/bake: skip registry identity validation without registry login#266
crazy-max wants to merge 3 commits into
docker:mainfrom
crazy-max:registry-identities-login-gate

Conversation

@crazy-max

@crazy-max crazy-max commented Jul 29, 2026

Copy link
Copy Markdown
Member

relates to https://github.com/docker/cli/actions/runs/30449872409/job/90569130577#step:3:173

Error: Invalid registry-identities input: registry-identities[0].connection_id must be a non-empty string

This change prevents setup-registry-identities from failing non-push image builds when registry login would not run under the current workflow logic.

The setup workflow now accepts a registry-login boolean and skips dependency installation plus registry identity validation when it is false. The build and bake workflows pass inputs.push && inputs.output == 'image', which matches the current condition used for registry login.

A caller can pass Docker Hub OIDC registry identities with connection_id: ${{ vars.FOO }} while running with output: image and push: false. If that variable resolves to an empty value, validation used to fail even though registry login was disabled and the identity would never be used. This keeps validation strict when login can happen, but avoids failing builds for unused registry identity config.

Also add extra commit to report errors cleanly with core.setFailed.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max requested review from thaJeztah and vvoland July 29, 2026 12:33
@crazy-max
crazy-max marked this pull request as ready for review July 29, 2026 12:33
@crazy-max
crazy-max requested a review from a team as a code owner July 29, 2026 12:33
@crazy-max
crazy-max marked this pull request as draft July 29, 2026 12:46
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max marked this pull request as ready for review July 29, 2026 14:23
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant