Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ywt114 authored Sep 15, 2023
1 parent 4d9e71b commit bc935ef
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ runs:
if [[ ${{ inputs.android }} == 'true' ]]; then
BEFORE=$(getAvailableSpace)
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/android || true
AFTER=$(getAvailableSpace)
SAVED=$((AFTER-BEFORE))
Expand All @@ -146,7 +146,7 @@ runs:
BEFORE=$(getAvailableSpace)
# https://github.community/t/bigger-github-hosted-runners-disk-space/17267/11
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/share/dotnet || true
AFTER=$(getAvailableSpace)
SAVED=$((AFTER-BEFORE))
Expand All @@ -158,7 +158,7 @@ runs:
if [[ ${{ inputs.haskell }} == 'true' ]]; then
BEFORE=$(getAvailableSpace)
sudo rm -rf /opt/ghc
sudo rm -rf /opt/ghc || true
AFTER=$(getAvailableSpace)
SAVED=$((AFTER-BEFORE))
Expand All @@ -171,14 +171,15 @@ runs:
if [[ ${{ inputs.large-packages }} == 'true' ]]; then
BEFORE=$(getAvailableSpace)
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
sudo apt-get remove -y '^mysql-.*'
sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
sudo apt-get autoremove -y
sudo apt-get clean
sudo apt-get update || true
sudo apt-get remove -y '^dotnet-.*' || true
sudo apt-get remove -y '^llvm-.*' || true
sudo apt-get remove -y 'php.*' || true
sudo apt-get remove -y '^mongodb-.*' || true
sudo apt-get remove -y '^mysql-.*' || true
sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri || true
sudo apt-get autoremove -y || true
sudo apt-get clean || true
AFTER=$(getAvailableSpace)
SAVED=$((AFTER-BEFORE))
Expand All @@ -190,7 +191,7 @@ runs:
if [[ ${{ inputs.docker-images }} == 'true' ]]; then
BEFORE=$(getAvailableSpace)
sudo docker image prune --all --force
sudo docker image prune --all --force || true
AFTER=$(getAvailableSpace)
SAVED=$((AFTER-BEFORE))
Expand All @@ -203,7 +204,7 @@ runs:
if [[ ${{ inputs.tool-cache }} == 'true' ]]; then
BEFORE=$(getAvailableSpace)
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true
AFTER=$(getAvailableSpace)
SAVED=$((AFTER-BEFORE))
Expand All @@ -215,8 +216,8 @@ runs:
if [[ ${{ inputs.swap-storage }} == 'true' ]]; then
BEFORE=$(getAvailableSpace)
sudo swapoff -a
sudo rm -f /mnt/swapfile
sudo swapoff -a || true
sudo rm -f /mnt/swapfile || true
free -h
AFTER=$(getAvailableSpace)
Expand Down

0 comments on commit bc935ef

Please sign in to comment.