Optimize Docker build caching for CI: add BuildKit cache mounts for apt, bundler, and yarn; use registry-based cache in CI pipeline
All checks were successful
Build and Push Docker Image / build-and-push-image (push) Successful in 1m22s

This commit is contained in:
Christoph Haas 2026-04-13 00:05:10 +02:00
parent 86c1d8ae5a
commit aacd2a7794
2 changed files with 18 additions and 13 deletions

View file

@ -51,7 +51,7 @@ jobs:
password: ${{ secrets.FORGEJO_TOKEN }}
# -------------------------------------------------------------------------
# Build and push image with GitHub Actions cache
# Build and push image with registry-based layer caching
# -------------------------------------------------------------------------
- name: Build and Push
uses: docker/build-push-action@v6
@ -59,5 +59,5 @@ jobs:
context: .
push: true
tags: git.workaround.org/${{ github.repository }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=registry,ref=git.workaround.org/${{ github.repository }}:buildcache
cache-to: type=registry,ref=git.workaround.org/${{ github.repository }}:buildcache,mode=max