From d7280073f8121ff2d0b160302092ddc13010852f Mon Sep 17 00:00:00 2001 From: Will <49654846+willmj@users.noreply.github.com> Date: Mon, 5 Aug 2024 19:00:02 -0400 Subject: [PATCH] Add functionality to free disk space from Github Actions (#287) * Add functionality to free disk space from Github Actions Signed-off-by: Will Johnson * Add functionality to free disk space from Github Actions, relocate from build-and-publish.yaml to image.yaml Signed-off-by: Will Johnson * Move freeing space step to before building image Signed-off-by: Will Johnson --------- Signed-off-by: Will Johnson --- .github/workflows/image.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 73bbe598..d4d836be 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -10,6 +10,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Free disk space + run: | + sudo swapoff -a + sudo rm -f /swapfile + sudo apt clean + docker rmi $(docker image ls -aq) + df -h - name: Build image run: | - docker build -t fms-hf-tuning:dev . -f build/Dockerfile \ No newline at end of file + docker build -t fms-hf-tuning:dev . -f build/Dockerfile + \ No newline at end of file