-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (39 loc) · 1.47 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish Docker image
permissions:
contents: read
on:
workflow_dispatch:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
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 docker-build
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 docker-test
env:
IMAGE_TAG: docker.io/hickorydns/hickory-dns:latest