add NO_BUILD and a preset only to build documentation #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-container | |
on: | |
push: | |
branches: [ neuland_new_calibration ] | |
workflow_dispatch: | |
jobs: | |
docker-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: 'true' | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
context: util/container | |
tags: ${{ vars.DOCKER_USERNAME }}/r3bdev:r3broot | |
apptainer-build: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: 'true' | |
- name: build apptainer and push | |
run: | | |
sudo add-apt-repository -y ppa:apptainer/ppa | |
sudo apt-get update | |
sudo apt-get install -y apptainer | |
apptainer remote add --no-login SylabsCloud cloud.sycloud.io | |
echo "${{ secrets.SYLABS_TOKEN }}" | apptainer remote login SylabsCloud | |
set -e | |
apptainer delete -F library://${{ vars.SYLABS_USERNAME }}/r3bdev/${image_tag} || true | |
sudo apptainer build --notest neuland.sif ./util/container/neuland.def | |
apptainer push -D "For testing" -U neuland.sif library://${{ vars.SYLABS_USERNAME }}/r3bdev/${image_tag} | |
shell: bash | |
env: | |
image_tag: 'neuland:latest' |