Skip to content

Commit

Permalink
Increase disk space available for building images
Browse files Browse the repository at this point in the history
also remove workflow_dispatch
  • Loading branch information
p-j-smith committed Jan 22, 2025
1 parent 5256550 commit 1d7bbcb
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Publish Docker and Apptainer images

on:
workflow_dispatch:
release:
types:
- published
Expand All @@ -12,19 +11,12 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: Check disk space
run: df -h

- name: "node-cleanup"
- name: Increase disk space available for building images
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 @@ -42,30 +34,21 @@ 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: false
push: true
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 @@ -82,6 +65,4 @@ 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
- name: Check disk space
run: df -h
apptainer push -U container.sif library://${{ secrets.SYLABS_USERNAME }}/enigma-pd-wml/enigma-pd-wml:$TAG

0 comments on commit 1d7bbcb

Please sign in to comment.