From e56f0ed29addaa84e91f2872e795bca85f29d24d Mon Sep 17 00:00:00 2001 From: Tianhao Gu Date: Thu, 4 Dec 2025 20:40:01 -0600 Subject: [PATCH 1/2] Refactor Docker build workflow conditions Updated conditions for disk space cleanup and Docker image build platforms. --- workflow-templates/build_docker_image.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/workflow-templates/build_docker_image.yaml b/workflow-templates/build_docker_image.yaml index 092f997..32398d9 100644 --- a/workflow-templates/build_docker_image.yaml +++ b/workflow-templates/build_docker_image.yaml @@ -1,7 +1,6 @@ -name: Build and push docker image +name: Build Image on: - workflow_call: workflow_dispatch: push: branches: [ "main", "master", "develop" ] @@ -42,10 +41,16 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Free Disk Space (Ubuntu) - if: ${{ (github.event_name == 'release' && github.event.action == 'published') || github.ref_type == 'tag' }} + if: ${{ github.event_name != 'pull_request' }} uses: jlumbroso/free-disk-space@main with: tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true - name: Build and push Docker image id: build-and-push @@ -55,5 +60,6 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: ${{ github.event_name == 'release' && github.event.action == 'published' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - sbom: ${{ github.event_name == 'release' && github.event.action == 'published' }} + # Build for both Intel (amd64) and Apple Silicon (arm64) Macs + # Pull requests only build amd64 for faster CI + platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }} From aef54ad683dac4d86a38f304820a9940f23a3ea9 Mon Sep 17 00:00:00 2001 From: Tianhao Gu Date: Thu, 4 Dec 2025 20:42:58 -0600 Subject: [PATCH 2/2] Update workflow-templates/build_docker_image.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- workflow-templates/build_docker_image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow-templates/build_docker_image.yaml b/workflow-templates/build_docker_image.yaml index 32398d9..769b190 100644 --- a/workflow-templates/build_docker_image.yaml +++ b/workflow-templates/build_docker_image.yaml @@ -60,6 +60,6 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - # Build for both Intel (amd64) and Apple Silicon (arm64) Macs + # Build for multiple architectures: amd64 (x86_64) and arm64 (ARM 64-bit) on Linux # Pull requests only build amd64 for faster CI platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}