Publish Docker images to Docker Hub and GHCR on tag#51
Merged
Conversation
- Add multi-stage Dockerfile (rust:slim-bookworm -> debian:bookworm-slim) with g++/cmake for the bundled duckdb C++ build. - Add .dockerignore to keep the build context small. - Add docker.yml workflow: on tag push, builds multi-arch (amd64+arm64) and pushes to docker.io/<user>/sql-splitter and ghcr.io/<owner>/sql-splitter with semver-derived tags. PRs that touch build inputs get a build-only dry run; workflow_dispatch accepts a tag input for backfilling existing releases. Requires DOCKERHUB_USERNAME + DOCKERHUB_TOKEN secrets on the repo before the first publish.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dockerfile(multi-stagerust:slim-bookworm→debian:bookworm-slim). Includesg++/cmakeso the bundledduckdbC++ build succeeds..dockerignoreto keep the build context small..github/workflows/docker.yml:v*: build multi-arch (linux/amd64,linux/arm64) and push to bothdocker.io/<DOCKERHUB_USERNAME>/sql-splitterandghcr.io/<owner>/sql-splitterworkflow_dispatchwith ataginput: builds and publishes that ref (use this to backfill old releases)Tags applied per image (via
docker/metadata-action):1.13.5,1.13,1,latest(when the ref is the highest semver)v1.13.5) for parity with the GitHub tagBefore merging
Add two repo secrets (Settings → Secrets and variables → Actions):
DOCKERHUB_USERNAME— your Docker Hub user (e.g.helgesverre)DOCKERHUB_TOKEN— a Docker Hub access token (Account Settings → Security → New Access Token, scoped read/write/delete on the repo)GHCR uses the workflow's
GITHUB_TOKEN— no extra secret needed.After merging
Backfill old releases by running the workflow once per existing tag:
(I'll do this for all ~30 tags once secrets are set.)
Test plan
docker run --rm <user>/sql-splitter:latest --versionprints the version🤖 Generated with Claude Code