ci: add Docker build/publish workflow on push to main#933
Conversation
Enable the u5c feature for the cargo-dist release build via [package.metadata.dist], so the installers/archives include the utxorpc source. dist switches to precise-builds and compiles with --features u5c; release.yml is unchanged (features apply at build time). Cost: ~+2.2 MB stripped over the base binary (~12 MB -> ~14 MB). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Compiles native per-arch binaries (x86_64, arm64) and assembles a multi-arch image pushed to ghcr.io/txpipe/oura, mirroring the approach used in Dolos. Publishes :latest on main and :stable + semver tags on v* releases. Uses oura's CI idioms (rustup honoring rust-toolchain.toml, Swatinem cache, setup-protoc) rather than archived actions-rs actions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdds a new Debian-slim Dockerfile at ChangesDocker Release Pipeline
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Context
Oura builds and publishes release binaries (via
dist/release.yml) and runs CI, but it never builds or publishes a Docker image automatically. Sibling project Dolos does this with adocker.ymlworkflow. This adds the analogous capability for oura.What this does
On push to
main(and onv*tags), compiles native per-arch binaries and assembles a multi-arch image pushed toghcr.io/txpipe/oura:buildjob — matrix over native runners (ubuntu-22.04x86_64 +ubuntu-22.04-armarm64), builds with--all-features --locked --release, uploads each binary as an artifact. Avoids slow QEMU emulation.dockerjob — downloads both binaries, renamesx86_64→amd64to match Docker'sTARGETARCH, and pushes a multi-arch image withlatest(default branch),stable+ semver (tags), andshatags.A thin
.github/image/Dockerfile(debian:12-slim) just copies the prebuilt binary in.Adaptations vs. the Dolos workflow
rustuphonoringrust-toolchain.toml(1.89) andSwatinem/rust-cache— instead of the archivedactions-rs/*actions.arduino/setup-protoc@v3, required by oura's build (everyci.ymljob installs it); Dolos doesn't need it.buildx@v3,metadata@v5,login@v3,build-push@v6).Existing root
Dockerfile,ci.yml, andrelease.ymlare untouched.Notes
ubuntu-22.04-arm, so it shouldn't need extra linker setup — proven on the firstmainrun.🤖 Generated with Claude Code
Summary by CodeRabbit