Skip to content

Commit

Permalink
Updated container build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ollie committed Jun 13, 2024
1 parent 9c5f16b commit a8950be
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build_deploy_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
release:
types: [created]
workflow_dispatch:
inputs:
tag:
description: 'Tag for the release'
required: true

jobs:
build-and-deploy:
Expand All @@ -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: |
Expand All @@ -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
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 }}

0 comments on commit a8950be

Please sign in to comment.