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 }}