From c37c7aadcd10fd95401b5982adbf5c74723b722e Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 28 Jul 2023 14:33:16 +1000 Subject: [PATCH] docker: Tag with git commit hash --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 1723846..80ab288 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -37,7 +37,7 @@ jobs: apt-get update apt-get install docker-ce-cli -y echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin - tag_num=$(git rev-list --count main) + tag_num=$(git rev-parse --short HEAD) docker build -t woodburn:$tag_num . docker tag woodburn:$tag_num git.woodburn.au/nathanwoodburn/woodburn:$tag_num docker push git.woodburn.au/nathanwoodburn/woodburn:$tag_num