Skip to content

ci: publish images to Docker Hub using OIDC - #13994

Merged
glours merged 1 commit into
docker:mainfrom
glours:ci/dockerhub-oidc
Aug 3, 2026
Merged

ci: publish images to Docker Hub using OIDC#13994
glours merged 1 commit into
docker:mainfrom
glours:ci/dockerhub-oidc

Conversation

@glours

@glours glours commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What I did
Replace the long-lived DOCKERPUBLICBOT PAT with short-lived tokens minted through the Docker Hub OIDC connection, using the registry-identities input of the github-builder bake workflow.

The connection rulesets cover both triggers of this workflow (refs/heads/main and refs/tags/v*) for compose-bin and compose-desktop-module.

Related issue
N/A

(not mandatory) A picture of a cute animal, if possible in relation to what you did

Replace the long-lived DOCKERPUBLICBOT PAT with short-lived tokens
minted through the Docker Hub OIDC connection, using the
registry-identities input of the github-builder bake workflow.

The connection rulesets cover both triggers of this workflow
(refs/heads/main and refs/tags/v*) for compose-bin and
compose-desktop-module.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
@glours
glours requested review from a team as code owners August 3, 2026 08:46
@glours
glours requested a review from ndeloof August 3, 2026 08:46
@glours glours self-assigned this Aug 3, 2026

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

This PR replaces long-lived Docker Hub PAT secrets (DOCKERPUBLICBOT_USERNAME / DOCKERPUBLICBOT_WRITE_PAT) with short-lived OIDC tokens via registry-identities. This is a clear security improvement — eliminating long-lived credentials reduces the blast radius of any future credential leak.

Both publish jobs (main-image and module-image) are updated consistently with the same connection_id, which is expected behavior for a shared OIDC connection. The workflow only triggers on merge/push to protected branches (not fork PRs), so the hardcoded connection_id is not a security risk.

No bugs or misconfigurations were found in the changed code.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@glours
glours merged commit ea82c55 into docker:main Aug 3, 2026
46 of 47 checks passed
@glours
glours deleted the ci/dockerhub-oidc branch August 3, 2026 09:08
registry-identities: |
- type: dockerhub
username: docker
connection_id: a295c8b7-54ab-4507-ac88-5c43003c73a5

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Silly question; will hard-coding it here cause it to always be non-empty, and forks attempting to use it (with a failure)?

(I'm guessing this workflow doesn't run on forks, so probably no difference; was just curious)

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.

4 participants