Repository navigation
CI: shared Docker build cache, release skips checks main already passed - #43
Merged
Merged
Conversation
- The pull request Docker build uses firsttris/workflows' docker-build action: the registry build cache shared with the release's amd64 build instead of a gha cache of its own (build image step was 153 s). - release.yml asks tested-on-main whether build.yml already passed on main for the code; a release commit that only bumps the version then goes straight to the Docker release instead of rerunning lint, tests, E2E and docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175jonGKuZthWB6TxfKE9Pr
The Docker build job in build.yml now asks for packages: write (build cache); a called workflow can't get more than its caller grants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175jonGKuZthWB6TxfKE9Pr
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.
What and why
Measured on recent runs: the Build workflow takes 2–3 min (max 5). Its longest job is Docker build at 176 s, of which 153 s are the image build, which in practice runs without a cache hit. E2E takes 105 s. A release takes 3.6–5 min, because it first runs all of build.yml again.
build.yml – Docker build job. It now uses
firsttris/workflows/actions/docker-build(dockerfile: Dockerfile, tagreactive-volcano-app:ci) instead of setup-buildx + build-push-action with a gha cache of its own. That gives it the registry build cacheghcr.io/firsttris/reactive-volcano-app-buildcache:linux-amd64, which it shares with the release's amd64 build. Whenpackage*.jsonand the sources haven't changed, thenpm ciand build stages come from the cache in both directions. The job getspackages: writeto keep the cache; a fork PR without it only builds slower. The PR-only condition is unchanged.release.yml – tested-on-main. A new
testedjob (withworkflows: build.yml) checks whether main's build.yml already passed for the code. A release commit from Bump version /npm versiononly changes the version, so the green run of the commit before it counts. In that casechecksis skipped anddockerstarts right away, which saves the whole lint/unit/E2E/docs round (~2–3 min). Any other commit runs the checks as before.dockergets the!cancelled() && tested ok && checks != failurecondition so a skippedchecksdoesn't skip it. It already grantspackages: write, which the shared registry cache needs. Thechecksjob (which calls build.yml) now also grantspackages: write. A called workflow can't get more permissions than its caller, and build.yml's Docker build job now asks for it.Docker publish: already the shared
docker-release.yml@v1, left as is.docs/releases.md and docs/testing.md describe both changes.
Validation
actionlint1.7.7: cleanUses firsttris/workflows#18 by branch; switched to @v1 once that is merged.
🤖 Generated with Claude Code
https://claude.ai/code/session_0175jonGKuZthWB6TxfKE9Pr
Generated by Claude Code
Generated by Claude Code