Skip to content

Commit

Permalink
cleaner cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Oct 28, 2024
1 parent b1eb0ad commit 8b83c1a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 19 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,7 @@ jobs:
with:
submodules: true

- run: df -h /
- run: |
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /opt/hostedtoolcache
sudo rm -rf /opt/google/chrome
sudo rm -rf /opt/microsoft/msedge
sudo rm -rf /opt/microsoft/powershell
sudo rm -rf /opt/pipx
sudo rm -rf /usr/lib/mono
sudo rm -rf /usr/local/julia*
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/share/swift
- run: df -h /
- run: sleep 10
- run: df -h /
- run: ./docker/gh-cleanup.sh

- run: ./docker/build.sh

Expand Down
31 changes: 31 additions & 0 deletions docker/gh-cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

echo Initial
df -h /
df /

FOLDERS="
$AGENT_TOOLSDIRECTORY
/opt/hostedtoolcache
/opt/google/chrome
/opt/microsoft/msedge
/opt/microsoft/powershell
/opt/pipx
/usr/lib/mono
/usr/local/julia*
/usr/local/lib/android
/usr/local/lib/node_modules
/usr/local/share/chromium
/usr/local/share/powershell
/usr/share/dotnet
/usr/share/swift
"

for folder in $FOLDERS ; do
echo "Cleaning up $folder"
rm -rf $folder
df /
done

echo "Final"
df -h /

0 comments on commit 8b83c1a

Please sign in to comment.