-
-
Notifications
You must be signed in to change notification settings - Fork 877
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f21db3
commit e7c56e3
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Disk cleanup | ||
description: "Cleanup disk space" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Free up disk space | ||
shell: bash | ||
run: | | ||
echo "Disk space before cleanup..." | ||
df -h / | ||
echo "Removing unnecessary files to free up disk space..." | ||
# https://github.com/actions/runner-images/issues/2840 | ||
sudo rm -rf \ | ||
/opt/hostedtoolcache \ | ||
/opt/google/chrome \ | ||
/opt/microsoft/msedge \ | ||
/opt/microsoft/powershell \ | ||
/opt/pipx \ | ||
/usr/lib/mono \ | ||
/usr/local/julia* \ | ||
/usr/local/lib/node_modules \ | ||
/usr/local/share/chromium \ | ||
/usr/local/share/powershell \ | ||
/usr/share/dotnet \ | ||
/usr/share/swift | ||
echo "Searching for Xcode versions:" | ||
find /Applications -name "Xcode_*" -maxdepth 1 -mindepth 1 | ||
echo "Removing old Xcode versions..." | ||
find /Applications -name "Xcode_*" -maxdepth 1 -mindepth 1 | grep -v `cat .xcode-version` | xargs rm -rf | ||
echo "Available Xcode versions after removal:" | ||
find /Applications -name "Xcode_*" -maxdepth 1 -mindepth 1 | ||
echo "Disk space after cleanup..." | ||
df -h / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters