.github/workflows/space.yml #7
This file contains hidden or 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
| on: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Show disk usage | |
| run: df -h | |
| - name: prune docker | |
| run: sudo docker image prune --all --force | |
| - name: Remove apt packages | |
| shell: bash | |
| run: | | |
| PACKAGES=( | |
| 'microsoft-edge-stable' | |
| 'azure-cli' | |
| '^google.*' | |
| '^temurin.*' | |
| 'powershell' | |
| '^llvm.*' | |
| 'snapd' | |
| '.*python.*' | |
| 'containerd.io' | |
| '^docker-ce.*' | |
| 'podman' | |
| 'kubectl' | |
| '^clang.*' | |
| '.*postgres.*' | |
| '.*mysql.*' | |
| '.*sqlite.*' | |
| 'mecab-ipadic' | |
| '.*gfortran.*' | |
| 'apache2-bin' | |
| 'shellcheck' | |
| 'git-lfs' | |
| 'mercurial' | |
| 'adwaita-icon-theme' | |
| '^php.*' | |
| 'ant' | |
| 'shim-signed' | |
| ) | |
| sudo apt-get remove --purge -y ${PACKAGES[@]} | |
| sudo apt-get autoremove -y | |
| sudo apt-get clean -y | |
| - name: Show apt packages | |
| run: dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -nr | |
| - name: Directories | |
| run: sudo du -h -d5 / --exclude /var --exclude /run --exclude /boot --exclude /tmp --exclude /sys --exclude /proc --exclude /lost+found | sort -hr | head -n 100 | |
| - name: Show disk usage | |
| run: df -h |