Skip to content

CI: shared Docker build cache, release skips checks main already passed - #43

Merged
firsttris merged 2 commits into
mainfrom
claude/ci-speedup
Oct 13, 2026
Merged

firsttris merged 2 commits into
mainfrom
claude/ci-speedup

Conversation

@firsttris

@firsttris firsttris commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

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, tag reactive-volcano-app:ci) instead of setup-buildx + build-push-action with a gha cache of its own. That gives it the registry build cache ghcr.io/firsttris/reactive-volcano-app-buildcache:linux-amd64, which it shares with the release's amd64 build. When package*.json and the sources haven't changed, the npm ci and build stages come from the cache in both directions. The job gets packages: write to keep the cache; a fork PR without it only builds slower. The PR-only condition is unchanged.

release.yml – tested-on-main. A new tested job (with workflows: build.yml) checks whether main's build.yml already passed for the code. A release commit from Bump version / npm version only changes the version, so the green run of the commit before it counts. In that case checks is skipped and docker starts right away, which saves the whole lint/unit/E2E/docs round (~2–3 min). Any other commit runs the checks as before. docker gets the !cancelled() && tested ok && checks != failure condition so a skipped checks doesn't skip it. It already grants packages: write, which the shared registry cache needs. The checks job (which calls build.yml) now also grants packages: 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

  • actionlint 1.7.7: clean
  • The Docker build job of this PR exercises the new action. The tested-on-main path only runs on the next tag.

Uses 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

- 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
@firsttris
firsttris merged commit f004469 into main Oct 13, 2026
6 checks passed
@firsttris
firsttris deleted the claude/ci-speedup branch October 16, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants