Skip to content

Use Docker Hub OIDC for public image CI - #507

Merged
sjmiller609 merged 8 commits into
mainfrom
hypeship/dockerhub-ssm-consumer
Nov 23, 2026
Merged

sjmiller609 merged 8 commits into
mainfrom
hypeship/dockerhub-ssm-consumer

Conversation

@sjmiller609

@sjmiller609 sjmiller609 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Authenticate Docker Hub pulls and publishing through OIDC.
  • Publish public Chromium images only from main. Same-repository PRs build both images with read-only access and pass them to the end-to-end tests as short-lived workflow artifacts.
  • Fork PRs continue to skip self-hosted image builds.

Validation

Workflow lint and action lockfile checks passed locally. GitHub Actions verifies both image builds and the end-to-end tests; the main-only publish path is not exercised by PR runs.


Note

Medium Risk
Changes CI auth and how PR e2e obtains images; publishing is gated to main, but OIDC connection setup must be correct or builds and e2e will fail.

Overview
Replaces stored Docker Hub username/password in Chromium image and server e2e workflows with docker/login-action@v4.7.0 OIDC (id-token: write, fixed onkernel user, branch-specific connection IDs for publish vs pull).

Non-main builds no longer push: images are saved as tarballs, uploaded via actions/upload-artifact, and e2e on PRs downloads and docker loads those artifacts instead of pulling from the registry; main still pushes and e2e pulls published tags.

Tightens self-hosted image jobs to kernel/kernel-images only (fork PRs still skipped). Refreshes .github/workflows/actions.lock for the new login, upload, and download action pins.

Reviewed by Cursor Bugbot for commit 1117dc1. Bugbot is set up for automated code reviews on this repo. Configure here.

Docker Hub enforces main-only publishing through the exact GitHub OIDC subject. The dockerhub-publish environment was not used on main and has no branch restrictions or required approvals.

@sjmiller609
sjmiller609 marked this pull request as ready for review November 9, 2026 19:46
@sjmiller609
sjmiller609 requested a review from rgarcia November 9, 2026 21:55
@sjmiller609
sjmiller609 marked this pull request as draft November 11, 2026 16:05
@sjmiller609 sjmiller609 changed the title Read Docker Hub CI credentials from SSM Use Docker Hub OIDC for public image CI Nov 11, 2026

@rgarcia rgarcia 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.

reviewed — the OIDC wiring looks right. approving, but the setup items below should be done before merge:

Blockers (setup)

  • .github/workflows/chromium-headful-image.yaml:11 (and headless) — dockerhub-publish env currently has no protection rules or branch policy; needs to be configured before merge or the environment adds nothing

Questions

  • .github/workflows/chromium-headful-image.yaml:11 — if required approvals are added, every main push and internal-PR build blocks on a human; is the plan to protect via env rules, or scope the push connection's trust to the environment:dockerhub-publish sub claim instead?
  • .github/workflows/server-test.yaml:129-134 — onkernel/chromium-headful/-headless are public, so the pull login only buys rate limits but adds a hard failure point; is it needed? if kept, the pull connection must trust both ref:refs/heads/main and pull_request sub claims — worth noting in setup

Nits

  • .github/workflows/chromium-headful-image.yaml:51 (and headless) — consider making the push connection ID an environment variable on dockerhub-publish rather than a repo variable
  • .github/workflows/chromium-headful-image.yaml:11 — env usage adds deployment entries to every PR timeline; fine if accepted
  • .github/workflows/server-test.yaml:20,27 — secrets: inherit no longer needed; dropping it keeps unrelated repo secrets out of the self-hosted build jobs

Follow-ups

  • delete DOCKERHUB_TOKEN secret and DOCKERHUB_USERNAME var once OIDC builds are verified green

@sjmiller609
sjmiller609 marked this pull request as ready for review November 23, 2026 20:30

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread .github/workflows/server-test.yaml Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1117dc1. Configure here.

@sjmiller609
sjmiller609 merged commit 97d3fbe into main Nov 23, 2026
12 checks passed
@sjmiller609
sjmiller609 deleted the hypeship/dockerhub-ssm-consumer branch November 23, 2026 21:02
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.

2 participants