actions: Fixed tags
This commit is contained in:
parent
bc3f813b29
commit
166e223429
@ -23,20 +23,21 @@ jobs:
|
|||||||
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
|
||||||
tag_num=$(git rev-parse --short HEAD)
|
tag_num=$(git rev-parse --short HEAD)
|
||||||
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||||
if [ "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" = "master" ]; then
|
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
|
||||||
docker build -t hnshosting-master:$tag_num .
|
if [ tag = "main" ]; then
|
||||||
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
$tag = "latest"
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
|
||||||
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:latest
|
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:latest
|
|
||||||
else
|
else
|
||||||
docker build -t hnshosting-master-dev:$tag_num .
|
$tag_num = $tag +"-"+ $tag_num
|
||||||
docker tag hnshosting-master-dev:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master-dev:$tag_num
|
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-master-dev:$tag_num
|
|
||||||
docker tag hnshosting-master-dev:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master-dev:latest
|
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-master-dev:latest
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
docker build -t hnshosting-master:$tag_num .
|
||||||
|
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
|
||||||
|
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:$tag
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Build Bot:
|
Build Bot:
|
||||||
@ -59,16 +60,16 @@ jobs:
|
|||||||
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
|
||||||
tag_num=$(git rev-parse --short HEAD)
|
tag_num=$(git rev-parse --short HEAD)
|
||||||
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||||
if [ "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" = "master" ]; then
|
tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
|
||||||
docker build -t hnshosting-bot:$tag_num .
|
if [ tag = "main" ]; then
|
||||||
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
|
$tag = "latest"
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
|
|
||||||
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:latest
|
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:latest
|
|
||||||
else
|
else
|
||||||
docker build -t hnshosting-bot-dev:$tag_num .
|
$tag_num = $tag +"-"+ $tag_num
|
||||||
docker tag hnshosting-bot-dev:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot-dev:$tag_num
|
fi
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot-dev:$tag_num
|
|
||||||
docker tag hnshosting-bot-dev:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot-dev:latest
|
docker build -t hnshosting-bot:$tag_num .
|
||||||
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot-dev:latest
|
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
|
||||||
fi
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
|
||||||
|
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag
|
||||||
|
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag
|
||||||
|
|
Loading…
Reference in New Issue
Block a user