Skip to content

Commit 8929bc7

Browse files
committed
free disk space
1 parent 143a6f3 commit 8929bc7

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/static.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,34 @@ jobs:
103103
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
104104
needs: [prepare]
105105
steps:
106+
# https://gist.github.com/antiphishfish/1e3fbc3f64ef6f1ab2f47457d2da5d9d
107+
- name: Free some disk space
108+
run: |
109+
set -xe
110+
sudo rm -rf /usr/share/dotnet
111+
sudo rm -rf /usr/share/swift
112+
sudo rm -rf /usr/local/lib/android
113+
sudo rm -rf /opt/ghc
114+
sudo rm -rf /usr/local/.ghcup
115+
sudo rm -rf "/usr/local/share/boost"
116+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
117+
sudo rm -rf /opt/hostedtoolcache/
118+
sudo rm -rf /usr/local/graalvm/
119+
sudo rm -rf /usr/local/share/powershell
120+
sudo rm -rf /usr/local/share/chromium
121+
sudo rm -rf /usr/local/lib/node_modules
122+
sudo docker image prune --all --force
123+
124+
APT_PARAMS='sudo apt -y -qq -o=Dpkg::Use-Pty=0'
125+
$APT_PARAMS remove -y '^dotnet-.*'
126+
$APT_PARAMS remove -y '^llvm-.*'
127+
$APT_PARAMS remove -y '^php.*'
128+
$APT_PARAMS remove -y '^mongodb-.*'
129+
$APT_PARAMS remove -y '^mysql-.*'
130+
$APT_PARAMS remove -y azure-cli google-* google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
131+
$APT_PARAMS autoremove --purge -y
132+
$APT_PARAMS autoclean
133+
$APT_PARAMS clean
106134
- name: Prepare
107135
id: prepare
108136
run: echo "sanitized_platform=${PLATFORM//\//-}" >> "${GITHUB_OUTPUT}"

0 commit comments

Comments
 (0)