Skip to content

Commit 49460d3

Browse files
karthick-rnKarthick
andauthored
Fix tag variable in Publish Image step (#269)
Co-authored-by: Karthick <karthick.narendran@microsoft.com>
1 parent 4db0f4e commit 49460d3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/cicd.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,18 @@ jobs:
4343

4444
- name: Publish Image
4545
id: publish_image
46-
run:
46+
run: |
4747
case "${GITHUB_REF}" in
4848
*tags*)
49-
echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT ;
50-
./scripts/cipublish --acr pccomponents --tag $tag
49+
tag=${GITHUB_REF/refs\/tags\//}
50+
echo "tag=${tag}" >> $GITHUB_OUTPUT
51+
./scripts/cipublish --acr pccomponents --tag ${tag}
5152
;;
5253
*)
53-
echo "Publishing to pccomponentstest as latest" ;
54-
echo "tag=latest" >> $GITHUB_OUTPUT ;
55-
./scripts/cipublish --acr pccomponentstest --tag latest ;
56-
echo "Also publishing to pccomponents ACR with unique tag" ;
54+
echo "Publishing to pccomponentstest as latest"
55+
echo "tag=latest" >> $GITHUB_OUTPUT
56+
./scripts/cipublish --acr pccomponentstest --tag latest
57+
echo "Also publishing to pccomponents ACR with unique tag"
5758
./scripts/cipublish --acr pccomponents --tag ${{ steps.most-recent-tag.outputs.tag }}.${{ github.run_number }}
5859
;;
5960
esac

0 commit comments

Comments
 (0)