From 525655065a11a2d8c7ae0bda3b869dcc353c133b Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Wed, 22 Jan 2025 09:52:20 +0000 Subject: [PATCH] delete unnecessary files from runner also print disk space at each step --- .github/workflows/publish.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4852a55..09488f5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,6 +12,19 @@ jobs: runs-on: ubuntu-latest steps: + + - name: Check disk space + run: df -h + + - name: "node-cleanup" + run: | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc "$AGENT_TOOLSDIRECTORY" + sudo docker image prune --all --force + sudo docker builder prune -a + + - name: Check disk space + run: df -h + - name: Check out the repo uses: actions/checkout@v4 @@ -29,14 +42,20 @@ jobs: tags: type=semver,pattern={{version}} + - name: Check disk space + run: df -h + - name: Build and push Docker image uses: docker/build-push-action@v6 with: context: . - push: true + push: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + - name: Check disk space + run: df -h + - name: Install Apptainer run: | sudo apt update && \ @@ -44,6 +63,9 @@ jobs: sudo add-apt-repository -y ppa:apptainer/ppa && \ sudo apt install -y apptainer + - name: Check disk space + run: df -h + - name: Write token for Sylabs Cloud env: SYLABS_TOKEN: ${{ secrets.SYLABS_TOKEN }} @@ -60,4 +82,6 @@ jobs: run: | TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1 | awk -F':' '{print $2}') apptainer build container.sif docker-daemon://${{ secrets.DOCKERHUB_USERNAME }}/enigma-pd-wml:$TAG - apptainer push -U container.sif library://${{ secrets.SYLABS_USERNAME }}/enigma-pd-wml/enigma-pd-wml:$TAG + + - name: Check disk space + run: df -h