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 15:19:39 -04:00 committed by GitHub
parent 25edbb2430
commit 6b6795e4a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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}