feat(ci): publish Docker image to Docker Hub and GHCR

Add dual-registry publishing to both Docker Hub (rootfr/jmap-webmail)
and GitHub Container Registry. Multi-arch support for amd64/arm64.
This commit is contained in:
Matthieu MALVACHE
2026-02-26 01:13:29 +01:00
committed by Matthieu MALVACHE
parent 1b0e3e41c6
commit 29f186b6f2
3 changed files with 16 additions and 8 deletions
+11 -6
View File
@@ -20,10 +20,6 @@ on:
tags: ["v*.*.*"]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
@@ -41,10 +37,16 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
@@ -52,11 +54,14 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
rootfr/jmap-webmail
ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=
- name: Build and push
uses: docker/build-push-action@v6