From 247a74881a8304c41dd564c9f346b5ad85a75845 Mon Sep 17 00:00:00 2001 From: Michael Ludvig <745857+mludvig@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:34:42 +1200 Subject: [PATCH 1/8] Added buildx support --- .github/workflows/docker-image.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index dd81efd26..52767f6c1 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -32,12 +32,18 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + # - name: Log in to the Container registry + # uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + # with: + # registry: ${{ env.REGISTRY }} + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta @@ -55,7 +61,8 @@ jobs: with: context: . file: Dockerfile - push: true + platforms: linux/amd64,linux/arm64 + push: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-args: NEXT_PUBLIC_GA4_MEASUREMENT_ID=${{ secrets.GA4_MEASUREMENT_ID }} \ No newline at end of file + build-args: NEXT_PUBLIC_GA4_MEASUREMENT_ID=${{ secrets.GA4_MEASUREMENT_ID }} From 6471fd8b6ffd3d2d3a1bfe0ef48a9af140af34c4 Mon Sep 17 00:00:00 2001 From: Michael Ludvig <745857+mludvig@users.noreply.github.com> Date: Tue, 16 Apr 2024 10:01:41 +1200 Subject: [PATCH 2/8] Enable action --- .github/workflows/docker-image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 52767f6c1..a413916a7 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,6 +14,7 @@ on: branches: - main #- main-stable # Disabled as the v* tag is used for stable releases + - arm-* tags: - 'v*' # Trigger on version tags (e.g., v1.7.0) From 6523da186cf5ae75777620105aae842b92a6ff31 Mon Sep 17 00:00:00 2001 From: Michael Ludvig <745857+mludvig@users.noreply.github.com> Date: Tue, 16 Apr 2024 10:29:18 +1200 Subject: [PATCH 3/8] Update versions, add arm32 --- .github/workflows/docker-image.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index a413916a7..de498a0c0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -34,21 +34,21 @@ jobs: uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - # - name: Log in to the Container registry - # uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - # with: - # registry: ${{ env.REGISTRY }} - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | @@ -58,12 +58,12 @@ jobs: type=semver,pattern={{version}} # Generate semantic versioning tags for tag builds - name: Build and push Docker image - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + uses: docker/build-push-action@v5 with: context: . file: Dockerfile - platforms: linux/amd64,linux/arm64 - push: false + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: NEXT_PUBLIC_GA4_MEASUREMENT_ID=${{ secrets.GA4_MEASUREMENT_ID }} From 8e09eaab45c1f81bd229d7d2e443001759ad2205 Mon Sep 17 00:00:00 2001 From: Michael Ludvig <745857+mludvig@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:10:32 +1200 Subject: [PATCH 4/8] Add sha tag --- .github/workflows/docker-image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index de498a0c0..ef26c81e5 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -56,6 +56,7 @@ jobs: type=raw,value=stable,enable=${{ github.ref == 'refs/heads/main-stable' }} type=ref,event=tag # Use the tag name as a tag for tag builds type=semver,pattern={{version}} # Generate semantic versioning tags for tag builds + type=sha # Just in case none of the above applies - name: Build and push Docker image uses: docker/build-push-action@v5 From 764377037c9ec6378c84c937e623bc775b331cab Mon Sep 17 00:00:00 2001 From: Michael Ludvig <745857+mludvig@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:22:15 +1200 Subject: [PATCH 5/8] Disabled arm 32 again (not supported by Prisma) --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ef26c81e5..42d40564d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -63,7 +63,7 @@ jobs: with: context: . file: Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From f126fc3087610dc8d69d9241ee6ea30e65ec23ba Mon Sep 17 00:00:00 2001 From: Michael Ludvig <745857+mludvig@users.noreply.github.com> Date: Tue, 16 Apr 2024 11:52:58 +1200 Subject: [PATCH 6/8] Cleanup --- .github/workflows/docker-image.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 42d40564d..5980c7496 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,12 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# GitHub recommends pinning actions to a commit SHA. -# To get a newer version, you will need to update the SHA. -# You can also reference a tag or branch, but the action may change without warning. - name: Create and publish Docker images on: @@ -14,7 +5,6 @@ on: branches: - main #- main-stable # Disabled as the v* tag is used for stable releases - - arm-* tags: - 'v*' # Trigger on version tags (e.g., v1.7.0) From be52680fcdf9f6da7f4b4c03d6959f7a4c07a33e Mon Sep 17 00:00:00 2001 From: Michael Ludvig <745857+mludvig@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:20:48 +1200 Subject: [PATCH 7/8] Put back hashes and comments --- .github/workflows/docker-image.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 5980c7496..863d978c4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,3 +1,12 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# GitHub recommends pinning actions to a commit SHA. +# To get a newer version, you will need to update the SHA. +# You can also reference a tag or branch, but the action may change without warning. + name: Create and publish Docker images on: @@ -5,6 +14,7 @@ on: branches: - main #- main-stable # Disabled as the v* tag is used for stable releases + - arm-* tags: - 'v*' # Trigger on version tags (e.g., v1.7.0) @@ -30,7 +40,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to the Container registry - uses: docker/login-action@v3 + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -38,7 +48,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | @@ -49,7 +59,7 @@ jobs: type=sha # Just in case none of the above applies - name: Build and push Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: context: . file: Dockerfile From ec4aaa3bfbc6394d085d3dded7270a830c95be29 Mon Sep 17 00:00:00 2001 From: Michael Ludvig <745857+mludvig@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:51:57 +1200 Subject: [PATCH 8/8] Cleanup --- .github/workflows/docker-image.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 863d978c4..022daa93f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,7 +14,6 @@ on: branches: - main #- main-stable # Disabled as the v* tag is used for stable releases - - arm-* tags: - 'v*' # Trigger on version tags (e.g., v1.7.0)