feat: add GitHub Actions workflow for Docker build and publish

This commit is contained in:
Dean Ward
2025-01-11 12:41:25 +00:00
parent abcf81eebb
commit a9b86236a7

35
.github/workflows/docker-publish.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Docker Build and Publish
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Build and push the multi-platform image
- name: Build and push multi-platform Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: wardy784/caddygen:latest