Create docker-image.yml

This commit is contained in:
Peter Schiffer 2021-10-05 19:53:01 +02:00 committed by GitHub
parent 6ddc04912e
commit 3c57cf8874
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

54
.github/workflows/docker-image.yml vendored Normal file
View file

@ -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 }}