diff options
Diffstat (limited to '.github/workflows/docker.yml')
| -rw-r--r-- | .github/workflows/docker.yml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d6de38fd..767a9cde 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: package: [web, workers, cli] + arch: [linux/amd64, linux/arm64] runs-on: ubuntu-latest permissions: packages: write @@ -35,11 +36,11 @@ jobs: build-args: SERVER_VERSION=nightly file: docker/Dockerfile target: ${{ matrix.package }} - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.arch }} push: true tags: ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:latest - 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 }} + cache-from: type=gha,scope=${{ matrix.package }}_${{ matrix.arch }} + cache-to: type=gha,mode=max,scope=${{ matrix.package }}_${{ matrix.arch }} - name: Build ${{ matrix.package }} (release) uses: docker/build-push-action@v5 @@ -49,8 +50,8 @@ jobs: build-args: SERVER_VERSION=${{ github.event.release.name }} file: docker/Dockerfile target: ${{ matrix.package }} - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.arch }} push: true tags: ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:${{ github.event.release.name }},ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:release - 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 }} + cache-from: type=gha,scope=${{ matrix.package }}_${{ matrix.arch }} + cache-to: type=gha,mode=max,scope=${{ matrix.package }}_${{ matrix.arch }} |
