From 7211dd026f0f2469715b628fb23ffb9f9348c7ec Mon Sep 17 00:00:00 2001 From: DarkSky Date: Thu, 11 Aug 2022 20:17:52 +0800 Subject: [PATCH] chore: arm64 images --- .github/deployment/Dockerfile-affine-multiplatform | 11 +++++++++++ .github/workflows/affine.yml | 12 ++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .github/deployment/Dockerfile-affine-multiplatform diff --git a/.github/deployment/Dockerfile-affine-multiplatform b/.github/deployment/Dockerfile-affine-multiplatform new file mode 100644 index 000000000..a794d7085 --- /dev/null +++ b/.github/deployment/Dockerfile-affine-multiplatform @@ -0,0 +1,11 @@ +FROM ghcr.io/toeverything/AFFiNE:relocate as relocate + +# ============= +# AFFiNE image +# ============= +FROM caddy:2.4.6-alpine as AFFiNE +WORKDIR /app +COPY --from=relocate /app . + +EXPOSE 3000 +CMD ["caddy", "run"] diff --git a/.github/workflows/affine.yml b/.github/workflows/affine.yml index 6ff463c6d..2de1b651b 100644 --- a/.github/workflows/affine.yml +++ b/.github/workflows/affine.yml @@ -57,9 +57,17 @@ jobs: uses: docker/build-push-action@v3 with: context: . - platforms: linux/amd64,linux/arm64/v8 file: ./.github/deployment/Dockerfile-affine + tags: relocate + target: AFFiNE + + - name: Build and push Docker image (AFFINE-Local) + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64,linux/arm64/v8 + file: ./.github/deployment/Dockerfile-affine-multiplatform push: ${{ github.ref == 'refs/heads/master' && true || false }} tags: ${{ steps.meta_affine.outputs.tags }} labels: ${{ steps.meta_affine.outputs.labels }} - target: AFFiNE + target: AFFiNE \ No newline at end of file