Skip to content

Upgrade Docker build workflow to use buildx with caching#355

Open
t0mdavid-m wants to merge 3 commits intomainfrom
claude/cache-docker-builds-6a9kW
Open

Upgrade Docker build workflow to use buildx with caching#355
t0mdavid-m wants to merge 3 commits intomainfrom
claude/cache-docker-builds-6a9kW

Conversation

@t0mdavid-m
Copy link
Member

@t0mdavid-m t0mdavid-m commented Mar 20, 2026

Summary

Upgraded the Docker image build workflow to use Docker Buildx with GitHub Actions caching for improved build performance and consistency.

Key Changes

  • Updated actions/checkout from v3 to v4
  • Replaced raw docker build commands with docker/build-push-action@v6 for both build jobs
  • Added docker/setup-buildx-action@v3 to enable Docker Buildx support
  • Implemented GitHub Actions cache integration (type=gha) for both full and simple app builds with separate cache scopes
  • Configured load: true to load built images into Docker daemon for local testing

Implementation Details

  • Each build job now has its own cache scope (full-app and simple-app) to prevent cache conflicts
  • Cache mode set to max to maximize cache reuse across builds
  • The structured approach using docker/build-push-action provides better integration with GitHub Actions and improved build performance through layer caching

https://claude.ai/code/session_01URHRBGmtAaVif55VvwnjNu

Summary by CodeRabbit

  • Chores
    • Optimized Docker image build workflow with enhanced build tooling and intelligent caching strategies to reduce build times and improve CI/CD pipeline efficiency.
    • Upgraded GitHub Actions dependencies to latest stable versions for improved reliability and compatibility.

Use docker/setup-buildx-action and docker/build-push-action with GHA
cache backend (type=gha, mode=max) to cache Docker layers between CI
runs. This avoids rebuilding unchanged layers, significantly speeding
up builds — especially the full OpenMS compilation in Dockerfile.

Each job uses a separate cache scope to avoid conflicts. mode=max
caches all intermediate multi-stage layers, not just the final image.

https://claude.ai/code/session_01URHRBGmtAaVif55VvwnjNu
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Caution

Review failed

The head commit changed during the review from 25564c6 to afd5579.

📝 Walkthrough

Walkthrough

The GitHub Actions workflow for building Docker images was updated to use the official docker/build-push-action@v6 with BuildX instead of direct docker build commands. The workflow now includes explicit caching configuration, context/file specifications, and updated action versions across both build jobs.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Updates
.github/workflows/build-docker-images.yml
Replaced docker build commands with docker/build-push-action@v6, added docker/setup-buildx-action@v3, configured cache-from/cache-to caching for both full-app and simple-app builds, set explicit context and file inputs, added load: true flag, and bumped actions/checkout from v3 to v4.

Poem

🐰 A docker build so fine and neat,
With BuildX magic, now complete!
Cache it here, cache it there,
Swift workflows floating through the air! 📦✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of the pull request: upgrading the Docker build workflow to use Buildx with caching, which is the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/cache-docker-builds-6a9kW
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

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