-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Disk cleanup test | ||
|
||
on: | ||
push: | ||
branches: | ||
- cleanup-tests | ||
|
||
jobs: | ||
cleanup: | ||
name: Disk cleanup | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:14 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Disk cleanup | ||
shell: bash | ||
run: | | ||
echo "Disk space before cleanup:" | ||
df -h | ||
sudo rm -rf /usr/local/lib/android || true | ||
sudo rm -rf /usr/share/dotnet || true | ||
sudo rm -rf /opt/ghc || true | ||
echo "Disk space after cleanup:" | ||
df -h | ||
- name: Disk cleanup 2 | ||
shell: bash | ||
run: | | ||
echo "Disk space before cleanup 2:" | ||
df -h | ||
sudo rm -rf /usr/local/.ghcup || true | ||
sudo rm -rf /opt/hostedtoolcache/CodeQL || true | ||
sudo rm -rf /usr/local/share/boost || true | ||
sudo apt-get clean | ||
echo "Disk space after cleanup 2:" | ||
df -h | ||
- name: Disk cleanup 3 | ||
shell: bash | ||
run: | | ||
echo "Disk space before cleanup 3:" | ||
df -h | ||
sudo docker image prune --all --force || true | ||
#sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true | ||
#sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..." | ||
#sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..." | ||
#sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..." | ||
#sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..." | ||
#sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..." | ||
#sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..." | ||
#sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..." | ||
#sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..." | ||
#sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..." | ||
#sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..." | ||
echo "Disk space after cleanup 3:" | ||
df -h |