actions: Fix errors from feature branches
This commit is contained in:
parent
b2f731ce8d
commit
d005c5796e
@ -24,11 +24,13 @@ jobs:
|
|||||||
tag_num=$(git rev-parse --short HEAD)
|
tag_num=$(git rev-parse --short HEAD)
|
||||||
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||||
tag=${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"
|
tag="latest"
|
||||||
else
|
else
|
||||||
tag_num="${tag}-${tag_num}"
|
tag_num="${tag}-${tag_num}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
docker build -t hnshosting-master:$tag_num .
|
docker build -t hnshosting-master:$tag_num .
|
||||||
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
||||||
@ -61,6 +63,7 @@ jobs:
|
|||||||
tag_num=$(git rev-parse --short HEAD)
|
tag_num=$(git rev-parse --short HEAD)
|
||||||
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||||
tag=${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"
|
tag="latest"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user