fixed ci workflow to save disk space
This commit is contained in:
@@ -128,29 +128,24 @@ jobs:
|
|||||||
echo "📋 package-list.json is ready for IG Publisher"
|
echo "📋 package-list.json is ready for IG Publisher"
|
||||||
cat package-list.json
|
cat package-list.json
|
||||||
|
|
||||||
- name: Free Disk Space
|
- name: Emergency Disk Cleanup
|
||||||
run: |
|
run: |
|
||||||
echo "Before cleanup:"
|
echo "Disk usage before:"
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
# Helper function to delete if directory exists
|
# 1. Delete the Hosted Tool Cache (This is the 47GB culprit in your logs)
|
||||||
clean_dir() {
|
echo "Clearing tool cache..."
|
||||||
if [ -d "$1" ]; then
|
rm -rf /opt/hostedtoolcache/*
|
||||||
echo "Deleting $1..."
|
|
||||||
rm -rf "$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Clear standard heavy paths (no sudo needed in act)
|
# 2. Delete other common heavy hitters if they exist
|
||||||
clean_dir /usr/share/dotnet
|
rm -rf /usr/share/dotnet
|
||||||
clean_dir /usr/local/lib/android
|
rm -rf /usr/local/lib/android
|
||||||
clean_dir /opt/ghc
|
rm -rf /opt/ghc
|
||||||
clean_dir /usr/local/share/boost
|
|
||||||
|
|
||||||
# Prune docker layers to free up the 'overlay' space
|
# 3. Clear the internal package caches
|
||||||
docker system prune -af || true
|
rm -rf ~/.fhir/packages
|
||||||
|
|
||||||
echo "After cleanup:"
|
echo "Disk usage after:"
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
- name: Install Docker CLI
|
- name: Install Docker CLI
|
||||||
|
|||||||
Reference in New Issue
Block a user