From a8950be82edde0fcdfa808ecc099d4567d1fedf2 Mon Sep 17 00:00:00 2001 From: Ollie Date: Thu, 13 Jun 2024 15:10:26 +0100 Subject: [PATCH] Updated container build workflow --- .github/workflows/build_deploy_container.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_deploy_container.yaml b/.github/workflows/build_deploy_container.yaml index 9d31810..f9e5965 100644 --- a/.github/workflows/build_deploy_container.yaml +++ b/.github/workflows/build_deploy_container.yaml @@ -4,6 +4,10 @@ on: release: types: [created] workflow_dispatch: + inputs: + tag: + description: 'Tag for the release' + required: true jobs: build-and-deploy: @@ -29,7 +33,7 @@ jobs: - name: Build and Push Docker Image run: | - docker buildx build --platform linux/amd64 -t $DOCKER_IMAGE_NAME:latest -t $DOCKER_IMAGE_NAME:$IMAGE_TAG --push . + docker buildx build --platform linux/amd64 -t $DOCKER_IMAGE_NAME:latest -t $DOCKER_IMAGE_NAME:${{ github.event.inputs.tag }} --push . - name: Install Singularity run: | @@ -47,5 +51,6 @@ jobs: - name: Push Singularity Image to Singularity Library run: | singularity push ${GITHUB_WORKSPACE}/image.sif $SINGULARITY_IMAGE_NAME:latest - singularity build ${GITHUB_WORKSPACE}/image_$IMAGE_TAG.sif docker-daemon://${DOCKER_IMAGE_NAME}:$IMAGE_TAG - singularity push ${GITHUB_WORKSPACE}/image_$IMAGE_TAG.sif $SINGULARITY_IMAGE_NAME:$IMAGE_TAG \ No newline at end of file + singularity build ${GITHUB_WORKSPACE}/image_${{ github.event.inputs.tag }}.sif docker-daemon://${DOCKER_IMAGE_NAME}:${{ github.event.inputs.tag }} + singularity push ${GITHUB_WORKSPACE}/image_${{ github.event.inputs.tag }}.sif $SINGULARITY_IMAGE_NAME:${{ github.event.inputs.tag }} + \ No newline at end of file