Browse Source

fix(ci): out of disk space (#4090)

Antony David 1 month ago
parent
commit
d948ac23af
2 changed files with 18 additions and 0 deletions
  1. 14 0
      .github/actions/free-disk-space/action.yml
  2. 4 0
      .github/workflows/main.yml

+ 14 - 0
.github/actions/free-disk-space/action.yml

@@ -0,0 +1,14 @@
+name: Free Disk Space
+description: Free up disk space on the runner
+runs:
+  using: composite
+  steps:
+  - name: Free Disk Space (Ubuntu)
+    if: runner.os == 'Linux'
+    shell: bash
+    run: |
+      echo "Freeing up disk space..."
+      sudo rm -rf /opt/ghc
+      sudo rm -rf /usr/share/dotnet
+      sudo rm -rf /usr/local/lib/android
+      sudo rm -rf /usr/share/swift

+ 4 - 0
.github/workflows/main.yml

@@ -69,6 +69,8 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
+      - name: Free Disk Space
+        uses: ./.github/actions/free-disk-space
       - uses: awalsh128/cache-apt-pkgs-action@latest
         with:
           packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
@@ -88,6 +90,8 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
+      - name: Free Disk Space
+        uses: ./.github/actions/free-disk-space
       - uses: awalsh128/cache-apt-pkgs-action@latest
         with:
           packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev