Publish Docker image #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Build docker image | |
run: make build-alpine | |
- name: Test docker image | |
run: make test-alpine | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USER }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Push docker image | |
run: make push |