Skip to content

Commit

Permalink
Add action to free up space in GH runner
Browse files Browse the repository at this point in the history
  • Loading branch information
valldrac committed Aug 14, 2024
1 parent 564fd15 commit ef39c8f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/actions/disk-cleanup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Disk cleanup
description: "Free up disk space by removing unused pre-installed software."
runs:
using: composite
steps:
- name: Free up disk space
shell: bash
run: |
echo "Disk space before cleanup:"
df -h /
sudo rm -rf \
/opt/google/chrome \
/opt/microsoft/msedge \
/opt/microsoft/powershell \
/usr/lib/mono \
/usr/local/.ghcup \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/dotnet \
/usr/share/swift \
echo "Disk space after cleanup:"
df -h /
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Free up disk space in runner
uses: ./.github/actions/disk-cleanup

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand Down

0 comments on commit ef39c8f

Please sign in to comment.