From c247d50ef644e48905213dc1391bf50c4b4f61b1 Mon Sep 17 00:00:00 2001 From: Abed <8110504+1b5d@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:20:19 +0100 Subject: [PATCH] GH actions free up disk space (#18) * gh actions free up disk space * cleanup free disk space commands * cleanup free disk space commands --- .github/workflows/publish-release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 43a9a44..9d883ea 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -66,6 +66,19 @@ jobs: steps: - name: Free disk space run: | + echo "Listing 100 largest packages" + dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 + df -h + echo "Removing large packages" + sudo apt-get remove -y '^dotnet-.*' + sudo apt-get remove -y '^llvm-.*' + sudo apt-get remove -y 'php.*' + sudo apt-get remove -y azure-cli google-cloud-cli google-chrome-stable firefox powershell mono-devel + sudo apt-get clean + df -h + echo "Removing large directories" + rm -rf /usr/share/dotnet/ + df -h sudo apt-get autoremove -y >/dev/null 2>&1 sudo apt-get autoclean -y >/dev/null 2>&1 docker rmi $(docker image ls -aq) >/dev/null 2>&1