Skip to content

Commit

Permalink
Build the new minimal image in GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcook committed Apr 5, 2024
1 parent 661b0a4 commit 024e450
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ jobs:
- run: ./configure --enable-docker --disable-dns --disable-sodium --disable-geoip
- run: cd docker/wforce_image && make test_wforce_image
- run: cd docker/wforce_image && make build_wforce_image
- run: cd docker && bash docker_push.sh
- run: cd docker && bash docker_push.sh "powerdns/wforce"
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
- run: cd docker/wforce_image && TAG=`git describe --tags` docker buildx build -f Dockerfile.minimal weakforced -t powerdns/wforce-minimal:$TAG --load
- run: cd docker && bash docker_push.sh "powerdns/wforce-minimal"
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
6 changes: 4 additions & 2 deletions docker/docker_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ push_tag()
local tag=$1
echo "Docker username is: '"$DOCKER_USERNAME"'"
docker_login
docker push powerdns/wforce:$tag
docker push $IMAGE:$tag
}

TAG=`git describe --tags`
Expand All @@ -24,10 +24,12 @@ then
push_tag $TAG
fi

IMAGE=$1

BRANCH=`git branch --show-current`
if [ "$BRANCH" = "master" ]
then
docker tag powerdns/wforce:$TAG powerdns/wforce:unstable
docker tag $IMAGE:$TAG $IMAGE:unstable
push_tag unstable
fi

Expand Down

0 comments on commit 024e450

Please sign in to comment.