From b1c52490f1977c7089c97ba0b1ede2849f219d11 Mon Sep 17 00:00:00 2001 From: jtyoung84 <104453205+jtyoung84@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:54:19 -0700 Subject: [PATCH] Build 2 pkg version (#4) * build: adds pkg version to docker image --- .github/workflows/tag_and_publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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