chore: implement nuclear runner cleanup to solve no space left on device
All checks were successful
All checks were successful
This commit is contained in:
@@ -154,16 +154,27 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_PASS }}" | docker login registry.infra.mintel.me -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
echo "${{ secrets.REGISTRY_PASS }}" | docker login registry.infra.mintel.me -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||||
|
|
||||||
- name: 🧹 Clean runner (Extreme)
|
- name: 🧹 Nuclear Runner Cleanup
|
||||||
run: |
|
run: |
|
||||||
echo "Disk space before prune:"
|
echo "Disk space before nuclear prune:"
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
|
# Massive cleanup of pre-installed runner software to free up ~5GB+
|
||||||
|
# These are standard on VM-based runners and often unnecessary
|
||||||
|
sudo rm -rf /usr/share/dotnet || true
|
||||||
|
sudo rm -rf /usr/local/lib/android || true
|
||||||
|
sudo rm -rf /opt/ghc || true
|
||||||
|
sudo rm -rf /opt/hostedtoolcache/CodeQL || true
|
||||||
|
|
||||||
|
# Comprehensive Docker purge
|
||||||
docker system prune -af --volumes
|
docker system prune -af --volumes
|
||||||
docker builder prune -af
|
docker builder prune -af
|
||||||
docker buildx prune -af
|
docker buildx prune -af
|
||||||
# Completely remove build history and artifacts on the runner
|
|
||||||
|
# Clean temp build artifacts
|
||||||
rm -rf /tmp/docker-actions-toolkit-* || true
|
rm -rf /tmp/docker-actions-toolkit-* || true
|
||||||
echo "Disk space after prune:"
|
|
||||||
|
echo "Disk space after nuclear prune:"
|
||||||
df -h
|
df -h
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user