Skip to content

ci: also publish release images to Docker Hub#587

Merged
daithihearn merged 2 commits into
mainfrom
ci/publish-dockerhub
Jun 1, 2026
Merged

ci: also publish release images to Docker Hub#587
daithihearn merged 2 commits into
mainfrom
ci/publish-dockerhub

Conversation

@Vombato

@Vombato Vombato commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Extend the release-image workflow to push the same per-arch image and the same tag set to docker.io/vechain/block-explorer alongside GHCR, so OSS consumers can docker pull vechain/block-explorer without authenticating. PR images stay on GHCR only.

A single docker buildx invocation pushes each architecture's digest to both registries via multi-line outputs:, and the merge job creates the manifest list on both registries with identical tag derivation.

Before merging, the user needs to:

  1. Create a Docker Hub Organization Access Token scoped to the block-explorer repository (Read & Write).
  2. Add vars.DOCKERHUB_USERNAME (Docker Hub org or service-account login) and secrets.DOCKERHUB_TOKEN (the OAT) to the repository.

Docker Hub does not support OIDC federation from GitHub Actions; a long-lived token is the only supported auth.

@Vombato Vombato added the increment:patch PR adds backwards compatible bug fixes / patches label May 26, 2026
@Vombato Vombato temporarily deployed to preview-approval May 26, 2026 08:45 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown

PR Docker Image Published

docker pull ghcr.io/vechain/block-explorer:pr.587.06b0009
Run locally
docker run --rm -p 3000:3000 ghcr.io/vechain/block-explorer:pr.587.06b0009

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown

Block explorer – Preview

Name Status Preview Updated (UTC)
block-explorer-preview 🗑️ Destroyed (06b0009) Preview deleted 2026-06-01 14:00:19

Preview environment destroyed after PR was closed

@Vombato Vombato temporarily deployed to preview-pr-587 May 26, 2026 08:51 — with GitHub Actions Inactive
@Vombato Vombato temporarily deployed to preview-pr-587 May 26, 2026 08:55 — with GitHub Actions Inactive
@Vombato Vombato marked this pull request as draft May 26, 2026 11:41
Extend the release-image workflow to push the same per-arch image
and the same tag set to docker.io/vechain/block-explorer alongside
ghcr.io. PR images are intentionally not duplicated; they stay on
GHCR only.

The push happens in a single buildx invocation via multi-line
`outputs:`, so each arch gets one digest that is pushed to both
registries. The merge job then runs `docker buildx imagetools
create` twice (once per registry) reusing the same digest sources
and the same version-tag derivation logic via a small shell helper.

Docker Hub does not support OIDC federation, so authentication is a
long-lived token. The workflow expects:

- `vars.DOCKERHUB_USERNAME` — Docker Hub org or service account name
- `secrets.DOCKERHUB_TOKEN`  — Organization Access Token scoped to
                                the `block-explorer` repository

Both have to be configured on the repo (Settings → Actions →
Variables / Secrets) before the workflow can publish to Docker Hub.

Workflow filename stays `publish-ghcr-image.yml` so branch
protection required-status references keep resolving; only the
`name:` header is updated to "Build & Publish Release Image".
@Vombato Vombato force-pushed the ci/publish-dockerhub branch from b1214a5 to ea2b1d5 Compare June 1, 2026 13:10
@Vombato Vombato temporarily deployed to preview-pr-587 June 1, 2026 13:11 — with GitHub Actions Inactive
@Vombato Vombato marked this pull request as ready for review June 1, 2026 13:11
@Vombato Vombato temporarily deployed to preview-pr-587 June 1, 2026 13:14 — with GitHub Actions Inactive
Build job now pushes per-arch digests to GHCR only. The merge job
creates the GHCR manifest list and mirrors each tag from GHCR to
Docker Hub with `docker buildx imagetools create`.
@daithihearn daithihearn merged commit 1adcdb6 into main Jun 1, 2026
12 checks passed
@daithihearn daithihearn deleted the ci/publish-dockerhub branch June 1, 2026 13:59
@daithihearn daithihearn deployed to preview-pr-587 June 1, 2026 13:59 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

increment:patch PR adds backwards compatible bug fixes / patches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants