fixed ci workflow to save disk space
Some checks failed
FHIR IG CI/CD Pipeline with Version Persistence / build-ig (push) Failing after 40s
FHIR IG CI/CD Pipeline with Version Persistence / deploy (push) Has been skipped

This commit is contained in:
2026-03-07 01:30:57 +06:00
parent 0bce070ae2
commit e6cb213212

View File

@@ -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)
clean_dir /usr/share/dotnet
clean_dir /usr/local/lib/android
clean_dir /opt/ghc
clean_dir /usr/local/share/boost
# Prune docker layers to free up the 'overlay' space # 2. Delete other common heavy hitters if they exist
docker system prune -af || true rm -rf /usr/share/dotnet
rm -rf /usr/local/lib/android
rm -rf /opt/ghc
echo "After cleanup:" # 3. Clear the internal package caches
rm -rf ~/.fhir/packages
echo "Disk usage after:"
df -h df -h
- name: Install Docker CLI - name: Install Docker CLI