Skip to content

Publish Docker image #55

Publish Docker image

Publish Docker image #55

Workflow file for this run

name: Publish Docker image
on:
release:
types: [published]
workflow_dispatch:
env:
REGISTRY: "registry-1.docker.io"
REPO: "dnsmonster"
jobs:
path-context:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: azure/docker-login@v2
with:
login-server: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build ${{ env.REPO }}
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
tags: ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.REPO }}:latest
- run: docker tag ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.REPO }}:latest ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.REPO }}:${GITHUB_REF##*/}
- run: docker push ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.REPO }}:latest
- run: docker push ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.REPO }}:${GITHUB_REF##*/}