diff --git a/.github/actions/disk_space/action.yml b/.github/actions/disk_space/action.yml index e8d70a1..dc3fc90 100644 --- a/.github/actions/disk_space/action.yml +++ b/.github/actions/disk_space/action.yml @@ -5,21 +5,6 @@ inputs: description: Enabling this will print before and after disk sizes default: false required: false - paths: - description: List of paths to clear - required: false - default: - - /opt/microsoft - - /usr/share/dotnet - - /usr/share/swift - - /usr/lib/jvm - - /usr/local/.ghcup - - /home/runner/.rustup - - /usr/local/share/chromium - - /usr/local/lib/android - - /opt/ghc - - /opt/hostedtoolcache - - /usr/lib/llvm-18 runs: using: "composite" @@ -39,11 +24,7 @@ runs: - name: Clear shell: bash run: | - SAVEIFS=$IFS - IFS=$'\n' - paths=${{ inputs.paths }} - IFS=$SAVEIFS - sudo rm -rf $paths + ./clean.sh sudo docker system prune -af || true sudo docker image prune -af || true sudo docker builder prune -af || true diff --git a/.github/actions/disk_space/clean.sh b/.github/actions/disk_space/clean.sh new file mode 100644 index 0000000..ae0c8b5 --- /dev/null +++ b/.github/actions/disk_space/clean.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +paths=( + "/home/runner/.rustup" + "/usr/share/dotnet" + "/usr/share/swift" + "/usr/lib/jvm" + "/usr/lib/llvm-18" + "/usr/local/.ghcup" + "/usr/local/share/chromium" + "/usr/local/lib/android" + "/opt/ghc" + "/opt/microsoft" + "/opt/hostedtoolcache" +) + +sudo rm -rf "${paths[@]}"