From d005c5796e15e69d096381e86dcfc82108e34d89 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 24 Aug 2023 17:43:02 +1000 Subject: [PATCH] actions: Fix errors from feature branches --- .gitea/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 26492ab..60922c2 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -24,11 +24,13 @@ 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 @@ -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