File tree Expand file tree Collapse file tree 1 file changed +25
-5
lines changed
.github/actions/free-disk-space Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,6 @@ set -euo pipefail
55df -h
66
77to_delete=(
8- " /lib/firefox"
9- " /lib/google-cloud-sdk"
10- " /lib/jvm"
11- " /lib/llvm-16"
12- " /lib/llvm-17"
138 " /opt/az"
149 " /opt/google"
1510 " /opt/hostedtoolcache/CodeQL"
@@ -19,10 +14,35 @@ to_delete=(
1914 " /opt/hostedtoolcache/node"
2015 " /opt/microsoft"
2116 " /opt/pipx"
17+ " /usr/lib/firefox"
18+ " /usr/lib/google-cloud-sdk"
19+ " /usr/lib/jvm"
20+ " /usr/lib/llvm-16"
21+ " /usr/lib/llvm-17"
22+ " /usr/local/.ghcup"
23+ " /usr/local/lib/android"
2224 " /usr/share/swift"
2325)
26+
2427for d in " ${to_delete[@]} " ; do
2528 echo " delete $d "
29+
30+ if [ ! -d " $d " ]; then
31+ echo " directory does NOT exist"
32+ exit 1
33+ fi
34+
35+ if [ -L " $d " ]; then
36+ echo " directory is a symlink, but we should delete the original source"
37+ exit 1
38+ fi
39+
40+ r=" $( realpath " $d " ) "
41+ if [ " $d " != " $r " ]; then
42+ echo " not a canonical path, use this instead: $r "
43+ exit 1
44+ fi
45+
2646 sudo rm -rf " $d "
2747done
2848
You can’t perform that action at this time.
0 commit comments