aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/docker.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/docker.yml')
-rw-r--r--.github/workflows/docker.yml13
1 files changed, 7 insertions, 6 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 99b0520a..accea7a3 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -11,6 +11,7 @@ jobs:
strategy:
matrix:
package: [web, workers]
+ platform: [linux/amd64, linux/arm64]
runs-on: ubuntu-latest
permissions:
packages: write
@@ -34,11 +35,11 @@ jobs:
context: .
file: docker/Dockerfile
target: ${{ matrix.package }}
- platforms: linux/amd64,linux/arm64
+ platforms: ${{ matrix.platform }}
push: true
tags: ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:latest
- cache-from: type=gha
- cache-to: type=gha,mode=max
+ cache-from: type=gha,scope=${{ matrix.package }}-${{ matrix.platform }}
+ cache-to: type=gha,mode=max,scope=${{ matrix.package }}-${{ matrix.platform }}
- name: Build ${{ matrix.package }} (release)
uses: docker/build-push-action@v5
@@ -47,8 +48,8 @@ jobs:
context: .
file: docker/Dockerfile
target: ${{ matrix.package }}
- platforms: linux/amd64,linux/arm64
+ platforms: ${{ matrix.platform }}
push: true
tags: ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:${{github.event.release.name}},ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:release
- cache-from: type=gha
- cache-to: type=gha,mode=max
+ cache-from: type=gha,scope=${{ matrix.package }}-${{ matrix.platform }}
+ cache-to: type=gha,mode=max,scope=${{ matrix.package }}-${{ matrix.platform }}