Skip to content

Commit

Permalink
ci(docker): Fix caching (#2391)
Browse files Browse the repository at this point in the history
Because we are building two different Docker containers (one for each
platform), we need separate caches for each one, otherwise both builds
use the same cache, resulting in them overwriting each other. By setting
a [separate scope for
each,](https://docs.docker.com/build/cache/backends/gha/#scope)
 the caches will be separate and not overwrite each other.
  • Loading branch information
szokeasaurusrex authored Feb 19, 2025
1 parent 7954b97 commit 6c108fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ jobs:
push: true
platforms: linux/${{ matrix.platform }}
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}-${{ matrix.platform }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}

multiarch-docker:
name: Create Multi-Architecture Docker Image
Expand Down

0 comments on commit 6c108fb

Please sign in to comment.