Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions workflow-templates/build_docker_image.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build and push docker image
name: Build Image

on:
workflow_call:
workflow_dispatch:
push:
branches: [ "main", "master", "develop" ]
Expand Down Expand Up @@ -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' }}
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The disk space cleanup now runs for all non-pull-request events including regular pushes to branches. This may unnecessarily slow down routine development builds. Consider restricting this to events that actually need the extra space (e.g., releases or tags): if: ${{ github.ref_type == 'tag' || (github.event_name == 'release' && github.event.action == 'published') }}

Suggested change
if: ${{ github.event_name != 'pull_request' }}
if: ${{ github.ref_type == 'tag' || (github.event_name == 'release' && github.event.action == 'published') }}

Copilot uses AI. Check for mistakes.
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
Expand All @@ -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' }}
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sbom generation step has been removed entirely. If SBOM (Software Bill of Materials) generation is still required for releases or security compliance, this line should be added back: sbom: ${{ github.event_name != 'pull_request' }}

Suggested change
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
- name: Generate SBOM
if: ${{ github.event_name != 'pull_request' }}
uses: aquasecurity/trivy-action@v0.13.1
with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
format: 'cyclonedx'
output: 'sbom.json'

Copilot uses AI. Check for mistakes.
Loading