Skip to content

Use GHA Cache for Docker Builder in CI#1172

Merged
Irakus merged 49 commits intomainfrom
docker_gha_cache
Mar 18, 2026
Merged

Use GHA Cache for Docker Builder in CI#1172
Irakus merged 49 commits intomainfrom
docker_gha_cache

Conversation

@Irakus
Copy link
Contributor

@Irakus Irakus commented Mar 12, 2026

📝 Description

Added GHCR as Docker cache.
Each branch has it's own cache to speed up consecutive builds for PRs.
There's also read access to main branch so that the first build will also be faster.
Branches only update cache of their own.
These changes have no impact for local builds so they won't impact development.

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests
  • 🚂 CI

🧪 Testing Scenarios

Describe how the changes were tested and how reviewers can test them too:

  • ✅ Tested manually
  • 🤖 Ran automated end-to-end tests

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and descriptive
  • 📝 For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR title. Do not include full URLs
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

@Irakus Irakus marked this pull request as ready for review March 16, 2026 12:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CI build pipeline to speed up Docker image builds by enabling remote layer caching via GHCR, scoped per branch while allowing reads from main’s cache.

Changes:

  • Adds optional GHCR-backed cache flags to Docker image builds via common.mk.
  • Configures CI workflows to enable caching via environment variables and authenticates to GHCR before building.
  • Uses per-branch cache tags (with fallback reads from main) to improve cache hit rates across PR runs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
common.mk Adds conditional Docker build cache arguments intended for GHCR-backed caching in CI.
.github/workflows/tests-bat.yml Enables caching env vars and logs into GHCR before BAT-related builds.
.github/workflows/tests-all.yml Enables caching env vars and logs into GHCR before the various test suites’ builds.

dmytroye and others added 3 commits March 17, 2026 14:06
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Irakus Irakus marked this pull request as draft March 17, 2026 13:59
@Irakus Irakus marked this pull request as ready for review March 17, 2026 14:44
@Irakus Irakus marked this pull request as draft March 17, 2026 14:46
@Irakus Irakus marked this pull request as ready for review March 18, 2026 11:05
@Irakus Irakus enabled auto-merge (squash) March 18, 2026 11:06
@Irakus Irakus merged commit 1abced2 into main Mar 18, 2026
38 checks passed
@Irakus Irakus deleted the docker_gha_cache branch March 18, 2026 11:58
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.

4 participants