From 287fc9a8fea47deaa3075495d43426bd48bea950 Mon Sep 17 00:00:00 2001 From: Himangini Date: Wed, 11 Oct 2023 13:04:56 +0100 Subject: [PATCH] Update build distros workflow to save disk space --- .../workflows/build-all-distros-nightly.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build-all-distros-nightly.yaml b/.github/workflows/build-all-distros-nightly.yaml index 1d78a64c0e..6afa323a99 100644 --- a/.github/workflows/build-all-distros-nightly.yaml +++ b/.github/workflows/build-all-distros-nightly.yaml @@ -9,6 +9,24 @@ jobs: name: build all distros runs-on: ubuntu-latest steps: + # Clean unnecessary files to save disk space + - name: clean unncessary files to save space + run: | + docker rmi `docker images -q` + sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/sudo apt/sources.list.d + sudo apt -y autoremove --purge + sudo apt -y autoclean + sudo apt clean + rm --recursive --force "$AGENT_TOOLSDIRECTORY" + df -h + # Free up disk space on Ubuntu + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8 #v1.3.0 + with: + # This might remove tools that are actually needed, if set to "true" but frees about 6 GB + tool-cache: false + large-packages: true + swap-storage: true - name: Checkout uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0 with: