From d358cd48f570deb0cb9e2e3de3cffc526e758ead Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Mon, 7 Oct 2024 07:30:56 -0500 Subject: [PATCH] chore(ci): only maximize space if building image (#1753) --- .github/workflows/reusable-build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index e13eee90dc5..63df97a0087 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -190,11 +190,6 @@ jobs: exit 1 fi - - name: Maximize build space - uses: ublue-os/remove-unwanted-software@517622d6452028f266b7ba4cc9a123b5f58a6b53 # v7 - with: - remove-codeql: true - - name: Check just syntax uses: ublue-os/just-action@bda593098a84a84973b002b4377709166a68be52 # v2 @@ -311,6 +306,12 @@ jobs: run: | echo "SHA_HEAD_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV + - name: Maximize build space + if: github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request' + uses: ublue-os/remove-unwanted-software@517622d6452028f266b7ba4cc9a123b5f58a6b53 # v7 + with: + remove-codeql: true + - name: Pull images if: github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request' uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0