ci: Docker Hub build & publish for dicoop/blockchain #1

Merged
dacom-dark-sun merged 2 commits from feat/docker-publish into main 2026-05-01 09:41:44 +00:00
dacom-dark-sun commented 2026-05-01 09:24:57 +00:00 (Migrated from github.com)

Summary

  • Adds .cicd/Dockerfile.publish — multi-stage Dockerfile (builder + slim runtime) for producing the dicoop/blockchain image without build artefacts. Builder compiles blockchain (this repo) and CDT (passed via --build-context), runtime keeps only /usr/local.
  • Companion .github/workflows/docker-publish.yaml is not yet in this PR because the OAuth token used for the push lacked the workflow scope. Will be added in a follow-up commit (or via GitHub UI on this branch).

Workflow plan (file content already drafted locally)

  • Triggers: push tags v* and manual workflow_dispatch with inputs cdt-ref (default v4.2.0), version-tag, push-latest.
  • Uses docker/build-push-action@v6 with cache-from/to: type=gha to keep rebuilds incremental.
  • Publishes dicoop/blockchain:<tag> (and :latest) to Docker Hub using DOCKERHUB_USERNAME / DOCKERHUB_TOKEN secrets.
  • Runs on ubuntu-latest, frees disk before build.

Test plan

  • Add the workflow file (manually via UI or via push with workflow scope).
  • Verify the workflow runs via workflow_dispatch and pushes a test image.
  • Re-tag v5.2.0 to trigger an automatic run end-to-end.
## Summary - Adds `.cicd/Dockerfile.publish` — multi-stage Dockerfile (builder + slim runtime) for producing the `dicoop/blockchain` image without build artefacts. Builder compiles blockchain (this repo) and CDT (passed via `--build-context`), runtime keeps only `/usr/local`. - Companion `.github/workflows/docker-publish.yaml` is **not yet in this PR** because the OAuth token used for the push lacked the `workflow` scope. Will be added in a follow-up commit (or via GitHub UI on this branch). ## Workflow plan (file content already drafted locally) - Triggers: `push tags v*` and manual `workflow_dispatch` with inputs `cdt-ref` (default `v4.2.0`), `version-tag`, `push-latest`. - Uses `docker/build-push-action@v6` with `cache-from/to: type=gha` to keep rebuilds incremental. - Publishes `dicoop/blockchain:<tag>` (and `:latest`) to Docker Hub using `DOCKERHUB_USERNAME` / `DOCKERHUB_TOKEN` secrets. - Runs on `ubuntu-latest`, frees disk before build. ## Test plan - [ ] Add the workflow file (manually via UI or via push with `workflow` scope). - [ ] Verify the workflow runs via `workflow_dispatch` and pushes a test image. - [ ] Re-tag `v5.2.0` to trigger an automatic run end-to-end.
Sign in to join this conversation.