diff --git a/.github/workflows/tag_and_publish.yml b/.github/workflows/tag_and_publish.yml index 6383458..1fcbb51 100644 --- a/.github/workflows/tag_and_publish.yml +++ b/.github/workflows/tag_and_publish.yml @@ -8,7 +8,7 @@ jobs: name: Bump version runs-on: ubuntu-latest outputs: - new_version: ${{ steps.output_version.outputs.new_version }} + new_version: ${{ steps.tag_version.outputs.new_version }} steps: - name: Checkout uses: actions/checkout@v3 @@ -74,6 +74,11 @@ jobs: sudo singularity build build/container.sif scripts/singularity_build.def - name: Login and Deploy Container run: | + if [[ ! -n ${{ jobs.tag.outputs.new_version }} ]]; then + echo "Tag is empty" && exit 1 + else + echo "Tag is not empty" + fi echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io - singularity push build/container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${{ needs.tag.outputs.new_version }} + singularity push build/container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${{ jobs.tag.outputs.new_version }} singularity push build/container.sif oras://ghcr.io/${GITHUB_REPOSITORY}:latest