docker: Generate tag num with git count
This commit is contained in:
parent
be65929ca3
commit
c23cef24df
@ -37,8 +37,9 @@ jobs:
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get install docker-ce-cli -y
|
apt-get install docker-ce-cli -y
|
||||||
echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin
|
echo "${{ secrets.DOCKERGIT_TOKEN }}" | docker login git.woodburn.au -u nathanwoodburn --password-stdin
|
||||||
docker build -t woodburn:latest .
|
tag_num=$(git rev-list --count main)
|
||||||
docker tag woodburn:latest git.woodburn.au/nathanwoodburn/woodburn:latest
|
docker build -t woodburn:$tag_num .
|
||||||
docker push git.woodburn.au/nathanwoodburn/woodburn:latest
|
docker tag woodburn:$tag_num git.woodburn.au/nathanwoodburn/woodburn:$tag_num
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/woodburn:$tag_num
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user