actions: Fixed main branch detect
All checks were successful
Build Docker / Build Bot (push) Successful in 22s
Build Docker / Build Master (push) Successful in 24s

This commit is contained in:
Nathan Woodburn 2023-08-24 18:35:41 +10:00
parent fd3e9ba760
commit 37158f410e
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -25,7 +25,7 @@ jobs:
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
tag=${tag//\//-}
if [ tag = "main" ]; then
if [[ "$tag" == "main" ]]; then
tag="latest"
else
tag_num="${tag}-${tag_num}"
@ -64,7 +64,7 @@ jobs:
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
tag=${tag//\//-}
if [ tag = "main" ]; then
if [[ "$tag" == "main" ]]; then
tag="latest"
else
tag_num="${tag}-${tag_num}"