From 3c57cf8874265c6bd6174f90819e80e8a3b1bb44 Mon Sep 17 00:00:00 2001 From: Peter Schiffer <3899107+pschiffe@users.noreply.github.com> Date: Tue, 5 Oct 2021 19:53:01 +0200 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..309f6be --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,54 @@ +name: Docker Image CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build and push PDNS Recursor latest + id: docker_build_recursor_latest + uses: docker/build-push-action@v2 + with: + context: ./pdns-recursor + file: ./Dockerfile + builder: ${{ steps.buildx.outputs.name }} + push: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-recursor:latest + + - name: Image digest + run: echo ${{ steps.docker_build_recursor_latest.outputs.digest }} + + - name: Build and push PDNS Recursor alpine + id: docker_build_recursor_alpine + uses: docker/build-push-action@v2 + with: + context: ./pdns-recursor + file: ./Dockerfile.alpine + builder: ${{ steps.buildx.outputs.name }} + push: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-recursor:alpine + + - name: Image digest + run: echo ${{ steps.docker_build_recursor_alpine.outputs.digest }}