Skip to content

Publish Docker image #9

Publish Docker image

Publish Docker image #9

Workflow file for this run

name: Publish Docker image
permissions:
contents: read
on:
workflow_dispatch:
release:
types: [published]
jobs:
publish-docker-image:
environment:
name: "docker-hub"
url: https://hub.docker.com/r/hickorydns/hickory-dns
name: Build and test image and publish the image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push image
run: make build-alpine
env:
DOCKER_BUILDKIT: 1
# Disabled: linux/ppc64le,linux/s390x
# See: https://github.com/hickory-dns/hickory-dns/issues/2065
PLATFORM: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
IMAGE_TAG: docker.io/hickorydns/hickory-dns:latest
ACTION: push
- name: Test docker image
run: make test-alpine
env:
IMAGE_TAG: docker.io/hickorydns/hickory-dns:latest