ci(docker): skip PR triggers β build only on push to main + release#218
Merged
Conversation
Docker workflow no longer runs on pull_request events. Triggers
are now scoped to:
- release: published (release-please tags)
- push to main (after a PR merges)
- workflow_dispatch (manual run from Actions UI)
Rationale: multi-arch docker builds (amd64 + arm64 via QEMU
emulation) take 12-18 minutes on cold cache, 3-6 minutes on
warm cache. Running them on every PR (even with the paths-filter
scoping to docker-related files) blocks PR review feedback and
slows the iteration loop.
Trade-off accepted:
- Docker breakage is now caught one step later: after a PR
merges to main, not during PR review.
- Easy to revert with a follow-up PR if a breaking change
lands on main.
- release.yml will fail loudly if the post-merge image build
is broken, so we still get a hard signal before tagging
a release.
Docker files (Dockerfile, .dockerignore, docker-compose.yml,
docker.yml) change rarely β most PRs are unaffected by this
change.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the βοΈ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Comment |
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
Stop running the Docker multi-arch build on PRs. From now on, it only runs when something actually needs to be published:
release: publishedβ publishes versioned tags +latest(release-please-driven)push: branches: [main]β publishesedge+main-<sha>workflow_dispatchβ manual run from the Actions UIThe
pull_requesttrigger is removed.Why
Multi-arch docker builds (amd64 + arm64 via QEMU emulation) are slow:
Even the cached case is longer than every other CI check in this repo. On PR #216 today, the build was visibly blocking review for ~15 minutes per attempt. Since PR builds are
push: falseanyway (verification-only, nothing pushed to a registry), the value-to-cost ratio is poor.Trade-off
mainpush: falsebuild artifact discardedIf a Docker-breaking change does land on
main:release.ymlwill fail when release-please tries to build for the release tag β surfaced before users see anythingWhat still triggers a build
main(touches Docker files)main(no Docker changes)stagingmain(e.g., PR merged)edge+main-<sha>stagingvX.Y.Z,latest,X.Y,XFiles changed (1)
.github/workflows/docker.ymlpull_requesttrigger + itspathsfilter; add inline comments documenting each remaining triggerDiff:
+5 / -10 lines.Test plan
Dockerfileβ Docker workflow should NOT run on itmain(or merge a PR to main) β Docker workflow SHOULD run and pushedge+main-<sha>to GHCRworkflow_dispatchmanually β should run on demandrelease: publishedevent should fire the workflow + push versioned tagsCompatibility
β No conflict with any open PR (touches only
.github/workflows/docker.yml)β Doesn't touch the Dockerfile, docker-compose.yml, or any build artifact
β Doesn't change what gets published β only when it gets built
π€ Generated with Claude Code