Skip to content

Commit 335ce26

Browse files
committed
free disk space
1 parent 143a6f3 commit 335ce26

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/static.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,34 @@ jobs:
227227
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
228228
needs: [prepare]
229229
steps:
230+
# https://gist.github.com/antiphishfish/1e3fbc3f64ef6f1ab2f47457d2da5d9d
231+
- name: Free disk space
232+
run: |
233+
set -xe
234+
sudo rm -rf /usr/share/dotnet
235+
sudo rm -rf /usr/share/swift
236+
sudo rm -rf /usr/local/lib/android
237+
sudo rm -rf /opt/ghc
238+
sudo rm -rf /usr/local/.ghcup
239+
sudo rm -rf "/usr/local/share/boost"
240+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
241+
sudo rm -rf /opt/hostedtoolcache/
242+
sudo rm -rf /usr/local/graalvm/
243+
sudo rm -rf /usr/local/share/powershell
244+
sudo rm -rf /usr/local/share/chromium
245+
sudo rm -rf /usr/local/lib/node_modules
246+
sudo docker image prune --all --force
247+
248+
APT_PARAMS='sudo apt -y -qq -o=Dpkg::Use-Pty=0'
249+
$APT_PARAMS remove -y '^dotnet-.*'
250+
$APT_PARAMS remove -y '^llvm-.*'
251+
$APT_PARAMS remove -y '^php.*'
252+
$APT_PARAMS remove -y '^mongodb-.*'
253+
$APT_PARAMS remove -y '^mysql-.*'
254+
$APT_PARAMS remove -y azure-cli google-* google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
255+
$APT_PARAMS autoremove --purge -y
256+
$APT_PARAMS autoclean
257+
$APT_PARAMS clean
230258
- name: Prepare
231259
id: prepare
232260
run: echo "sanitized_platform=${PLATFORM//\//-}" >> "${GITHUB_OUTPUT}"

0 commit comments

Comments
 (0)