From 71d59dd9f1eca71a872f6762c6dec0c92eb155e0 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Thu, 4 Jun 2026 17:11:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(ci)=20build=20arm64=20target=20onl?= =?UTF-8?q?y=20on=20release=20tags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restrict arm64 builds to release tags only, instead of running them on every build. The arm64 pipeline was significantly slowing down CI with little practical usage, degrading developer experience for regular workflows. Keep arm64 builds for release validation, and handle occasional failures manually if needed. --- .github/workflows/docker-hub.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index a77c5a17..89d18c2a 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -19,6 +19,8 @@ env: DOCKER_USER: 1001:127 DOCKER_CONTAINER_REGISTRY_HOSTNAME: docker.io DOCKER_CONTAINER_REGISTRY_NAMESPACE: lasuite + IS_MULTI_PLATFORM_BUILD: ${{ startsWith(github.ref, 'refs/tags/v') }} + BUILD_PLATFORMS: ${{ startsWith(github.ref, 'refs/tags/v') && 'linux/amd64,linux/arm64' || 'linux/amd64' }} jobs: build-and-push-backend: @@ -31,6 +33,7 @@ jobs: uses: actions/checkout@v6 - name: Set up QEMU + if: env.IS_MULTI_PLATFORM_BUILD == 'true' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -60,7 +63,7 @@ jobs: with: context: . target: backend-production - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.BUILD_PLATFORMS }} build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} @@ -76,6 +79,7 @@ jobs: uses: actions/checkout@v6 - name: Set up QEMU + if: env.IS_MULTI_PLATFORM_BUILD == 'true' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -106,7 +110,7 @@ jobs: context: . file: ./src/frontend/Dockerfile target: frontend-production - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.BUILD_PLATFORMS }} build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} @@ -122,6 +126,7 @@ jobs: uses: actions/checkout@v6 - name: Set up QEMU + if: env.IS_MULTI_PLATFORM_BUILD == 'true' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -152,7 +157,7 @@ jobs: context: . file: ./docker/dinum-frontend/Dockerfile target: frontend-production - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.BUILD_PLATFORMS }} build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} @@ -168,6 +173,7 @@ jobs: uses: actions/checkout@v6 - name: Set up QEMU + if: env.IS_MULTI_PLATFORM_BUILD == 'true' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -200,7 +206,7 @@ jobs: context: ./src/summary file: ./src/summary/Dockerfile target: production - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.BUILD_PLATFORMS }} build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} @@ -216,6 +222,7 @@ jobs: uses: actions/checkout@v6 - name: Set up QEMU + if: env.IS_MULTI_PLATFORM_BUILD == 'true' uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -248,7 +255,7 @@ jobs: context: ./src/agents file: ./src/agents/Dockerfile target: production - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.BUILD_PLATFORMS }} build-args: DOCKER_USER=${{ env.DOCKER_USER }}:-1000 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }}