Skip to content

chore(ci): authenticate container registries via OIDC - #7342

Draft
sds wants to merge 5 commits into
mainfrom
chore/dockerhub-oidc
Draft

chore(ci): authenticate container registries via OIDC#7342
sds wants to merge 5 commits into
mainfrom
chore/dockerhub-oidc

Conversation

@sds

@sds sds commented Aug 27, 2026

Copy link
Copy Markdown
Member

Replaces Docker Hub credentials with Docker Hub OIDC, replaces GHCR GITHUB_TOKEN logins with package-write tokens minted through GitHub STS, adds the dedicated ghcr-publish STS policy, removes built-in packages: write grants, preserves publishing from both repositories, and updates every docker/login-action use to v4.6.0.

In Docker Hub, add four rulesets to the existing read/write connection with subjects repo:tempoxyz@211589300/tempo@994992847:ref:refs/heads/*, repo:tempoxyz@211589300/tempo@994992847:ref:refs/tags/v*.*.*, repo:tempoxyz@211589300/tempo-private-fork@1160043351:ref:refs/heads/*, and repo:tempoxyz@211589300/tempo-private-fork@1160043351:ref:refs/tags/v*.*.*, granting read/write only to tempoxyz/tempo, tempoxyz/tempo-localnet, tempoxyz/tempo-sidecar, and tempoxyz/tempo-xtask.

The Docker Hub connection ID is already stored as DOCKERHUB_OIDC_CONNECTIONID_WRITE in both GitHub repositories; these workflows have no pull-only Docker Hub context, so the READ connection is not used here, and DOCKER_HUB_TOKEN plus DOCKER_HUB_USER can be deleted from both repositories after OIDC-backed runs succeed.

Use separate read-only and read/write Docker Hub connections for private-fork pulls and upstream image publishing, removing the workflow dependency on a long-lived Docker Hub token.
@sds
sds force-pushed the chore/dockerhub-oidc branch from b83274e to e6d8f9e Compare August 27, 2026 22:53
sds added 3 commits August 27, 2026 16:12
Use the read/write OIDC connection in both repositories because the shared workflow publishes Docker Hub images from each.
Use the OIDC-capable action version consistently and rely on the login action itself to report missing connection configuration.
Mint short-lived package-write tokens for container publishing and remove package access from the built-in workflow token.
@sds sds changed the title chore(ci): authenticate Docker Hub via OIDC chore(ci): authenticate container registries via OIDC Aug 27, 2026
@sds
sds marked this pull request as draft August 28, 2026 01:13
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