Skip to content

Conversation

@Tianhao-Gu
Copy link
Contributor

Updated conditions for disk space cleanup and Docker image build platforms.

Updated conditions for disk space cleanup and Docker image build platforms.
Copilot AI review requested due to automatic review settings December 5, 2025 02:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the Docker build workflow to simplify trigger conditions and expand build platform coverage. The changes shift from release-centric multi-platform builds to building for multiple architectures on all events except pull requests, which now only build for amd64 to speed up CI.

Key Changes

  • Modified disk space cleanup to run on all events except pull requests (previously only on releases/tags)
  • Inverted platform selection logic: pull requests now build only amd64, while all other events build both amd64 and arm64
  • Enhanced disk cleanup with additional options (android, dotnet, haskell, large-packages, docker-images, swap-storage)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 5, 2025 02:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- 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.
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.
@Tianhao-Gu Tianhao-Gu closed this Dec 5, 2025
@Tianhao-Gu Tianhao-Gu deleted the Tianhao-Gu-patch-1 branch December 5, 2025 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants