Skip to content

Commit 77a7401

Browse files
committed
chore: fix Free disk space release-image-cache-sync.yml
1 parent 89284b7 commit 77a7401

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/release-image-cache-sync.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,36 @@ jobs:
106106
outputs:
107107
tag-name: ${{ steps.get_tag_name.outputs.TAG-NAME }}
108108
steps:
109+
- name: Free disk space
110+
continue-on-error: true
111+
run: |
112+
RELEASE_IMG="${{ inputs.IMG }}"
113+
case $RELEASE_IMG in
114+
apecloud/aperag)
115+
echo "Initial disk usage:"
116+
df -h
117+
118+
# Remove unnecessary software to free up space for Docker builds
119+
sudo rm -rf /usr/share/dotnet
120+
sudo rm -rf /usr/local/lib/android
121+
sudo rm -rf /opt/ghc
122+
sudo rm -rf /opt/hostedtoolcache/CodeQL
123+
sudo rm -rf /usr/local/share/boost
124+
sudo rm -rf /usr/lib/jvm
125+
sudo rm -rf /usr/share/swift
126+
127+
# Clean up docker images and containers
128+
docker system prune -af --volumes
129+
130+
# Clean apt cache
131+
sudo apt-get clean
132+
sudo apt-get autoremove -y
133+
134+
echo "Disk usage after cleanup:"
135+
df -h
136+
;;
137+
esac
138+
109139
- name: Checkout Code
110140
if: ${{ ! inputs.ENABLE_SUBMODULE }}
111141
uses: actions/checkout@v4

0 commit comments

Comments
 (0)