Add custom Docker image publishing to the existing workflow#4065
Add custom Docker image publishing to the existing workflow#4065
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4065 +/- ##
==========================================
+ Coverage 85.90% 88.67% +2.77%
==========================================
Files 51 25 -26
Lines 3399 2438 -961
Branches 610 616 +6
==========================================
- Hits 2920 2162 -758
+ Misses 477 274 -203
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Have you considered modifying the existing |
Yeah, I did consider it, and you can see it in the commit history: 8b269cd - both in one but a rather confusing UX of release_tag, custom_ref and custom_tag at that point I gave up, also worrying about breaking the release workflow and perhaps overcomplicating things. But you're right, it would be better to have the common workflow shared. I could either:
What do you reckon? |
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The shared _build_electric_image.yml now only builds multi-arch images and exports digests. Each caller (release and custom) handles its own manifest creation and tagging logic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Drop the shared workflow abstraction — just add a new self-contained workflow alongside the unchanged release workflow. Simpler and no risk to the existing release pipeline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep both repo tags in the build step (matching main's approach) since untagged push-by-digest images are harmless — only the publish step controls which repos get tagged manifests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2333ce6 to
117931d
Compare
|
I've gone with
what do you think @alco ? |
Why
We sometimes need to publish Docker images from feature branches for testing (e.g.
electricsql/electric:subqueries-alpha) without going through the release flow. The existing workflow only supported release tags viarelease_tag, so there was no clean way to do this from CI.Usage (custom builds)
In GitHub Actions, go to "Publish Electric images to Docker Hub" → Run workflow
Fill in:
rob/simple-subqueries-with-dnf)subqueries-alpha)This publishes a multiarch image to
electricsql/electric:<your-tag>. Custom builds don't touchlatest,canary, or the canary repo.Implementation
Rather than adding a separate workflow, this extends the existing Docker Hub workflow with a new optional
docker_taginput and replacesrelease_tagwith the more generalgit_ref.The workflow now has three build modes, determined automatically from the inputs:
git_refdocker_tagcanarycanary,electric-canary:latest,electric-canary:<sha>releaselatest,<version>custom<custom tag>onlyAlso updates
changesets_release.ymlto use the renamedgit_refinput.🤖 Generated with Claude Code