From 52c2f738e06a85d61d3dab3cc085d5ca8fb354cb Mon Sep 17 00:00:00 2001 From: Sivanantham Chinnaiyan Date: Mon, 5 Feb 2024 13:17:43 +0530 Subject: [PATCH] Free up storage in CI Signed-off-by: Sivanantham Chinnaiyan --- .github/actions/free-up-disk-space/action.yml | 16 ++++++++++++++++ .github/workflows/freeup-space.yml | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/freeup-space.yml diff --git a/.github/actions/free-up-disk-space/action.yml b/.github/actions/free-up-disk-space/action.yml index f8a0d42bd8a..5ea4723c547 100644 --- a/.github/actions/free-up-disk-space/action.yml +++ b/.github/actions/free-up-disk-space/action.yml @@ -32,3 +32,19 @@ runs: docker image prune -a -f docker system df df -h + + - name: Free space using action easimon/maximize-build-space@master + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 512 + swap-size-mb: 1024 + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' + remove-codeql: 'true' + remove-docker-images: 'true' + + - name: Free space + shell: bash + run: | + df -Th diff --git a/.github/workflows/freeup-space.yml b/.github/workflows/freeup-space.yml new file mode 100644 index 00000000000..5886ec0ce54 --- /dev/null +++ b/.github/workflows/freeup-space.yml @@ -0,0 +1,19 @@ +name: Free up storage space + +on: + pull_request: + +jobs: + freeup-storage: + runs-on: ubuntu-latest + steps: + - name: Before cleanup + run: | + df -Th + + - name: free up storage + uses: ./github/actions/free-up-disk-space + + - name: After cleanup + run: | + sf -Th