actions: Added dev build
All checks were successful
Build Docker / Build Master (push) Successful in 28s
Build Docker / Build Bot (push) Successful in 29s

This commit is contained in:
Nathan Woodburn 2023-08-24 17:23:23 +10:00
parent aa11014ab9
commit bc3f813b29
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -23,12 +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
docker build -t hnshosting-master:$tag_num . docker build -t hnshosting-master:$tag_num .
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/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 push git.woodburn.au/nathanwoodburn/hnshosting-master:$tag_num
docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:latest docker tag hnshosting-master:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-master:latest
docker push git.woodburn.au/nathanwoodburn/hnshosting-master:latest docker push git.woodburn.au/nathanwoodburn/hnshosting-master:latest
else
docker build -t hnshosting-master-dev:$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
Build Bot: Build Bot:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -50,8 +59,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
docker build -t hnshosting-bot:$tag_num . docker build -t hnshosting-bot:$tag_num .
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:$tag_num
docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:latest docker tag hnshosting-bot:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot:latest
docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:latest docker push git.woodburn.au/nathanwoodburn/hnshosting-bot:latest
else
docker build -t hnshosting-bot-dev:$tag_num .
docker tag hnshosting-bot-dev:$tag_num git.woodburn.au/nathanwoodburn/hnshosting-bot-dev:$tag_num
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 push git.woodburn.au/nathanwoodburn/hnshosting-bot-dev:latest
fi