docker: Generate tag num with git count
All checks were successful
Build Docker / CheckFiles (push) Successful in 8s
Build Docker / Build Docker (push) Successful in 23s

This commit is contained in:
Nathan Woodburn 2023-07-28 14:29:32 +10:00
parent be65929ca3
commit c23cef24df
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -37,8 +37,9 @@ jobs:
apt-get update
apt-get install docker-ce-cli -y
echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin
docker build -t woodburn:latest .
docker tag woodburn:latest git.woodburn.au/nathanwoodburn/woodburn:latest
docker push git.woodburn.au/nathanwoodburn/woodburn:latest
tag_num=$(git rev-list --count main)
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