Fix release tagging workflow (#2034)

In Bash, "-eq" compares integers, and "==" compares strings, so "debug
-eq latest" always evaulated to true.

$ if [[ "debug" -eq "latest" ]]; then echo latest; else echo debug; fi
latest
$ if [[ "debug" == "latest" ]]; then echo latest; else echo debug; fi
debug
This commit is contained in:
Jason Hall
2022-05-16 12:19:39 -07:00
committed by GitHub
parent 25edbb2430
commit 6b6795e4a7
+1 -1
View File
@@ -115,7 +115,7 @@ jobs:
crane cp ${{ matrix.image-name }}@${{ steps.build-and-push.outputs.digest }} \
${{ matrix.image-name }}:${{ matrix.release-tag }}
if [[ ${{ matrix.release-tag }} -eq "latest" ]]; then
if [[ "${{ matrix.release-tag }}" == "latest" ]]; then
# Tag :latest images as :v1.X.Y
crane cp ${{ matrix.image-name }}@${{ steps.build-and-push.outputs.digest }} \
${{ matrix.image-name }}:${tag}