From 95cc9e6ff29cd39dc80aa09c80a6d1c9489b5d6a Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Fri, 22 Mar 2024 00:43:57 +0000 Subject: [PATCH] fix: Use registry cache type instead of gha --- .github/workflows/docker.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index accea7a3..134842e5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,7 +11,6 @@ jobs: strategy: matrix: package: [web, workers] - platform: [linux/amd64, linux/arm64] runs-on: ubuntu-latest permissions: packages: write @@ -35,11 +34,11 @@ jobs: context: . file: docker/Dockerfile target: ${{ matrix.package }} - platforms: ${{ matrix.platform }} + platforms: linux/amd64,linux/arm64 push: true tags: ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:latest - cache-from: type=gha,scope=${{ matrix.package }}-${{ matrix.platform }} - cache-to: type=gha,mode=max,scope=${{ matrix.package }}-${{ matrix.platform }} + cache-from: type=registry,ref=ghcr.io/mohamedbassem/hoarder-build-cache:${{ matrix.package }} + cache-to: type=registry,mode=max,ref=ghcr.io/mohamedbassem/hoarder-build-cache:${{ matrix.package }} - name: Build ${{ matrix.package }} (release) uses: docker/build-push-action@v5 @@ -48,8 +47,8 @@ jobs: context: . file: docker/Dockerfile target: ${{ matrix.package }} - platforms: ${{ matrix.platform }} + platforms: linux/amd64,linux/arm64 push: true tags: ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:${{github.event.release.name}},ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:release - cache-from: type=gha,scope=${{ matrix.package }}-${{ matrix.platform }} - cache-to: type=gha,mode=max,scope=${{ matrix.package }}-${{ matrix.platform }} + cache-from: type=registry,ref=ghcr.io/mohamedbassem/hoarder-build-cache:${{ matrix.package }} + cache-to: type=registry,mode=max,ref=ghcr.io/mohamedbassem/hoarder-build-cache:${{ matrix.package }}