From d67c248926f73d1051cd379c2a3bd156a90d5304 Mon Sep 17 00:00:00 2001 From: Karthick Date: Tue, 25 Nov 2025 15:09:19 +0000 Subject: [PATCH] Fix tag variable in Publish Image step --- .github/workflows/cicd.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 05095872..e9f213b4 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -43,17 +43,18 @@ jobs: - name: Publish Image id: publish_image - run: + run: | case "${GITHUB_REF}" in *tags*) - echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT ; - ./scripts/cipublish --acr pccomponents --tag $tag + tag=${GITHUB_REF/refs\/tags\//} + echo "tag=${tag}" >> $GITHUB_OUTPUT + ./scripts/cipublish --acr pccomponents --tag ${tag} ;; *) - echo "Publishing to pccomponentstest as latest" ; - echo "tag=latest" >> $GITHUB_OUTPUT ; - ./scripts/cipublish --acr pccomponentstest --tag latest ; - echo "Also publishing to pccomponents ACR with unique tag" ; + echo "Publishing to pccomponentstest as latest" + echo "tag=latest" >> $GITHUB_OUTPUT + ./scripts/cipublish --acr pccomponentstest --tag latest + echo "Also publishing to pccomponents ACR with unique tag" ./scripts/cipublish --acr pccomponents --tag ${{ steps.most-recent-tag.outputs.tag }}.${{ github.run_number }} ;; esac