diff --git a/workflow-templates/build_docker_image.yaml b/workflow-templates/build_docker_image.yaml index 092f997..769b190 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 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' }}