-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3572 from twz123/reclaim-gh-runner-disk-space
Reclaim GitHub Runner disk space
- Loading branch information
Showing
3 changed files
with
24 additions
and
7 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
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,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set +eux | ||
|
||
if [ -z "$GITHUB_RUN_ID" ]; then | ||
echo "Cowardly refusing to destroy a machine that doesn't look like a GitHub runner." >&2 | ||
exit 0 | ||
fi | ||
|
||
df -h / | ||
|
||
docker system prune --all --force & | ||
sudo rm -rf /imagegeneration/installers & | ||
sudo rm -rf -- "${ANDROID_SDK_ROOT-/opt/nevermind}" & | ||
|
||
wait | ||
|
||
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