Skip to content

Commit

Permalink
delete unnecessary files from runner
Browse files Browse the repository at this point in the history
also print disk space at each step
  • Loading branch information
p-j-smith committed Jan 22, 2025
1 parent 8957d56 commit 5256550
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -29,21 +42,30 @@ 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 && \
sudo apt install -y software-properties-common && \
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 }}
Expand All @@ -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

0 comments on commit 5256550

Please sign in to comment.