Skip to content

Docker Build and Push #1

Docker Build and Push

Docker Build and Push #1

name: Build and Push Docker Image to Docker Hub
on:
release:
types: [published]
jobs:
build-push:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: danieloppenlander/cloudflare-ddns:latest,danieloppenlander/cloudflare-ddns:{{ github.event.release.name }}