-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gha: Free up Github runner disk space
We are having the below failure due to no disk space, it seems like we can remove pre-installed software and language runtimes, which are not use in Cilium, to reclaim more disk space. Alternative option is to bump the runner, but it might not be the best resource and cost utilization. Relates: https://github.com/cilium/cilium/actions/runs/10300396788 Relates: actions/runner-images#2840 (comment) Signed-off-by: Tam Mach <[email protected]>
- Loading branch information
1 parent
55c44d6
commit e553bd2
Showing
2 changed files
with
31 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,28 @@ | ||
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#issuecomment-2272410832 | ||
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/android \ | ||
/usr/local/lib/node_modules \ | ||
/usr/local/share/chromium \ | ||
/usr/local/share/powershell \ | ||
/usr/share/dotnet \ | ||
/usr/share/swift | ||
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