Skip to content

Commit 7878984

Browse files
authored
ci: free disk space (#1790)
1 parent 5f642ef commit 7878984

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ jobs:
6767
with:
6868
egress-policy: audit
6969

70+
- name: Free up disk space
71+
run: |
72+
initial_space=$(df / | grep / | awk '{print $4}')
73+
docker system prune -af
74+
rm -rf /usr/share/dotnet
75+
rm -rf /opt/ghc
76+
rm -rf /usr/local/share/boost
77+
rm -rf $AGENT_TOOLSDIRECTORY
78+
rm -rf /opt/hostedtoolcache
79+
80+
final_space=$(df / | grep / | awk '{print $4}')
81+
difference=$((final_space - initial_space))
82+
echo "Disk space difference (in KB): $difference"
83+
7084
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7185

7286
- name: Publish to DockerHub Registry

0 commit comments

Comments
 (0)