mirror of
https://github.com/DeanWard/CaddyGen.git
synced 2026-05-03 07:50:45 +00:00
35 lines
851 B
YAML
35 lines
851 B
YAML
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 |