From 29f186b6f279ed49bb539a6ff79dfbb6b27e268f Mon Sep 17 00:00:00 2001 From: Matthieu MALVACHE Date: Thu, 26 Feb 2026 01:13:29 +0100 Subject: [PATCH] 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. --- .github/workflows/docker-publish.yml | 17 +++++++++++------ README.md | 5 ++++- ROADMAP.md | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 236305a8..a709e680 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -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 diff --git a/README.md b/README.md index 06cc5dd7..5e3c833e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/ROADMAP.md b/ROADMAP.md index 6bf56ec2..1aeb3526 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -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