Signed-off-by: Glenn Jocher <[email protected]> Co-authored-by: UltralyticsAssistant <[email protected]>
26 lines
727 B
YAML
26 lines
727 B
YAML
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
|
|
name: "Disk Space Cleanup"
|
|
author: "Ultralytics"
|
|
description: "Cleans up disk space by removing unnecessary tool caches and swap space"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Cleanup disk space
|
|
shell: bash
|
|
run: |
|
|
echo "Free space before deletion:"
|
|
df -h /
|
|
|
|
# Remove tool cache to free up ~15GB of space per https://github.com/ultralytics/ultralytics/pull/15848
|
|
rm -rf /opt/hostedtoolcache || true
|
|
|
|
# Remove swap space to free up ~4GB
|
|
if [ -f /swapfile ]; then
|
|
sudo swapoff -a
|
|
sudo rm -f /swapfile
|
|
fi
|
|
|
|
echo "Free space after deletion:"
|
|
df -h /
|