Skip to content

Commit

Permalink
ci: free up disk space on GitHub hosted runners
Browse files Browse the repository at this point in the history
  • Loading branch information
malt3 committed Oct 9, 2023
1 parent fdd47b7 commit f2cb329
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/actions/setup_bazel/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,31 @@ runs:
fi
echo "::endgroup::"
- name: Free up space (Ubuntu)
shell: bash
if: startsWith(runner.name, 'GitHub Actions') && runner.os == 'Linux'
run: |
echo "::group::Free up space (Ubuntu)"
echo "Available storage (before):"
df -h
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 rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo apt-get autoremove -y
sudo apt-get clean
echo "Available storage (after):"
df -h
echo "::endgroup::"
- name: Configure Bazel (general)
shell: bash
env:
Expand Down

0 comments on commit f2cb329

Please sign in to comment.