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
+4 -1
View File
@@ -132,7 +132,7 @@ This webmail client is designed to work seamlessly with [**Stalwart Mail Server*
- Persistent language preference
### Deployment
- Pre-built Docker image on [GitHub Container Registry](https://ghcr.io/root-fr/jmap-webmail) (amd64/arm64)
- Pre-built Docker image on [Docker Hub](https://hub.docker.com/r/rootfr/jmap-webmail) and [GHCR](https://ghcr.io/root-fr/jmap-webmail) (amd64/arm64)
- Docker support with multi-stage build and standalone output
- Runtime environment variables (no rebuild needed for config changes)
- Health check endpoint for container orchestration
@@ -233,6 +233,9 @@ npm start
```bash
# Using the pre-built image (recommended)
docker run -p 3000:3000 -e JMAP_SERVER_URL=https://mail.example.com rootfr/jmap-webmail:latest
# Or from GHCR
docker run -p 3000:3000 -e JMAP_SERVER_URL=https://mail.example.com ghcr.io/root-fr/jmap-webmail:latest
# Or with docker compose
+1 -1
View File
@@ -230,7 +230,7 @@ This document tracks the development status and planned features for JMAP Webmai
- [x] Health check endpoint
- [x] Docker support (multi-stage build, docker-compose, standalone output)
- [x] Structured server-side logger (text/JSON format, configurable level)
- [x] Pre-built Docker image on GitHub Container Registry (ghcr.io) with multi-arch support (amd64/arm64)
- [x] Pre-built Docker image on [Docker Hub](https://hub.docker.com/r/rootfr/jmap-webmail) and [GHCR](https://ghcr.io/root-fr/jmap-webmail) with multi-arch support (amd64/arm64)
- [x] GitHub Actions CI/CD for automated image publishing on releases
## Planned Features