Skip to content

Commit

Permalink
Free disk space
Browse files Browse the repository at this point in the history
  • Loading branch information
kingdonb committed Mar 28, 2024
1 parent 64dc70a commit 8af93be
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,35 @@ jobs:
make -C lib stat.wasm
cp lib/stat.wasm "${HOME}/.local/bin"
# Copied from: https://github.com/orgs/community/discussions/25678
# https://github.com/apache/flink/blob/02d30ace69dc18555a5085eccf70ee884e73a16e/tools/azure-pipelines/free_disk_space.sh
# Fixes:
# https://github.com/kingdonb/stats-tracker-ghcr/actions/runs/8471469779
# (release System.IO.IOException: No space left on device)
# You are running out of disk space.
- name: Free disk space
shell: bash
run: |
echo "=============================================================================="
echo "Freeing up disk space on CI system"
echo "=============================================================================="
echo "Listing 100 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
df -h
echo "Removing large packages"
sudo apt-get remove -y '^ghc-8.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
# deleting 15GB
rm -rf /usr/share/dotnet/
df -h
- name: Build and push tag
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 8af93be

Please sign in to comment.