actions: Fix errors from feature branches
All checks were successful
Build Docker / Build Master (push) Successful in 27s
Build Docker / Build Bot (push) Successful in 24s

This commit is contained in:
Nathan Woodburn 2023-08-24 17:43:02 +10:00
parent b2f731ce8d
commit d005c5796e
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -24,12 +24,14 @@ jobs:
tag_num=$(git rev-parse --short HEAD)
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
tag=${tag//\//-}
if [ tag = "main" ]; then
tag="latest"
else
tag_num="${tag}-${tag_num}"
fi
docker build -t hnshosting-master:$tag_num .
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
@ -61,6 +63,7 @@ jobs:
tag_num=$(git rev-parse --short HEAD)
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
tag=${tag//\//-}
if [ tag = "main" ]; then
tag="latest"
else