From 778c1b3d9210114219718c353d7e85c66942022a Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 25 Aug 2023 13:21:24 +1000 Subject: [PATCH] actions: Change numbering --- .gitea/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 6127c18..756435e 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -21,10 +21,11 @@ jobs: run : | cd master echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin - 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//\//-} + tag_num=$(git rev-list --count HEAD) + if [[ "$tag" == "main" ]]; then tag="latest" else @@ -60,10 +61,10 @@ jobs: run : | cd discord-bot echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin - 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//\//-} + tag_num=$(git rev-list --count HEAD) if [[ "$tag" == "main" ]]; then tag="latest" else