Skip to content

totalsegmentator-v1.0.5_rhnode1.3.0a.7 #77

totalsegmentator-v1.0.5_rhnode1.3.0a.7

totalsegmentator-v1.0.5_rhnode1.3.0a.7 #77

name: Build+push manager image on release
on:
release:
types:
- published
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check disk space
run: df . -h
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
#docker-images: true
swap-storage: true
- name: Identify node
id: step1
run: |
VAL=${{github.event.release.tag_name}}
echo "valid=true" >> $GITHUB_OUTPUT
if [[ "$VAL" == zerodose-* ]]; then
echo "dir=nodes/zerodose" >> $GITHUB_OUTPUT
echo "image_zerodose" >> $GITHUB_OUTPUT
elif [[ "$VAL" == hdbet-* ]]; then
echo "dir=nodes/hdbet" >> $GITHUB_OUTPUT
echo "image_name=hdbet" >> $GITHUB_OUTPUT
elif [[ "$VAL" == hdctbet-* ]]; then
echo "dir=nodes/hdctbet" >> $GITHUB_OUTPUT
echo "image_name=hdctbet" >> $GITHUB_OUTPUT
elif [[ "$VAL" == amyloidai-* ]]; then
echo "dir=nodes/amyloidAI" >> $GITHUB_OUTPUT
echo "image_name=amyloidai" >> $GITHUB_OUTPUT
elif [[ "$VAL" == aims-* ]]; then
echo "dir=nodes/aims" >> $GITHUB_OUTPUT
echo "image_name=aims" >> $GITHUB_OUTPUT
elif [[ "$VAL" == totalsegmentator-* ]]; then
echo "dir=nodes/totalsegmentator" >> $GITHUB_OUTPUT
echo "image_name=totalsegmentator" >> $GITHUB_OUTPUT
elif [[ "$VAL" == flirt-* ]]; then
echo "dir=nodes/flirt" >> $GITHUB_OUTPUT
echo "image_name=flirt" >> $GITHUB_OUTPUT
elif [[ "$VAL" == reorient2std-* ]]; then
echo "dir=nodes/reorient2std" >> $GITHUB_OUTPUT
echo "image_name=reorient2std" >> $GITHUB_OUTPUT
elif [[ "$VAL" == fslmaths-* ]]; then
echo "dir=nodes/fslmaths" >> $GITHUB_OUTPUT
echo "image_name=fslmaths" >> $GITHUB_OUTPUT
elif [[ "$VAL" == convertxfm-* ]]; then
echo "dir=nodes/convertXFM" >> $GITHUB_OUTPUT
echo "image_name=convertxfm" >> $GITHUB_OUTPUT
elif [[ "$VAL" == brainpetnr-* ]]; then
echo "dir=nodes/brainPETNR" >> $GITHUB_OUTPUT
echo "image_name=brainpetnr" >> $GITHUB_OUTPUT
elif [[ "$VAL" == pe2idenoiser-* ]]; then
echo "dir=nodes/pe2idenoiser" >> $GITHUB_OUTPUT
echo "image_name=pe2idenoiser" >> $GITHUB_OUTPUT
elif [[ "$VAL" == zerodose_dicom-* ]]; then
echo "dir=dicom_nodes/zerodose" >> $GITHUB_OUTPUT
echo "image_name=zerodose_dicom" >> $GITHUB_OUTPUT
else
echo "valid=false" >> $GITHUB_OUTPUT
fi
- name: Split branch name
if : ${{steps.step1.outputs.valid == 'true'}}
env:
TAG_NAME: ${{ github.event.release.tag_name }}
id: split
run: echo "version=${TAG_NAME##*-}" >> $GITHUB_OUTPUT
-
name: Set up QEMU
if : ${{steps.step1.outputs.valid == 'true'}}
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
if : ${{steps.step1.outputs.valid == 'true'}}
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
if : ${{steps.step1.outputs.valid == 'true'}}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
if : ${{steps.step1.outputs.valid == 'true'}}
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:${{steps.step1.outputs.dir}}"
push: true
tags: rhnode/${{steps.step1.outputs.image_name}}:${{ steps.split.outputs.version }}