From c688f323c19992b24355e590181d5eefc19d9337 Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Mon, 19 Oct 2026 02:43:15 +0000 Subject: [PATCH] ci: publish docker image on release tags Gitea Actions workflow triggered by release/* tags: builds the image with the hostinger runner and pushes gitea.woggioni.net/woggioni/xmcp: and :latest. Also document the release process in the README. --- .gitea/workflows/build.yaml | 40 +++++++++++++++++++++++++++++++++++++ README.md | 22 ++++++++++++++++---- 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..38b1884 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,40 @@ +name: CI +on: + push: + tags: + - 'release/*' + +jobs: + build_and_push_docker_image: + name: "Build and push docker image" + runs-on: hostinger + steps: + - name: Checkout sources + uses: actions/checkout@v6 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Gitea container registry + uses: docker/login-action@v3 + with: + registry: gitea.woggioni.net + username: woggioni-opencode-agent + password: ${{ secrets.PUBLISHER_TOKEN }} + - name: Extract metadata for image tags + id: meta + uses: docker/metadata-action@v5 + with: + images: gitea.woggioni.net/woggioni/xmcp + flavor: latest=false + tags: | + type=match,pattern=release/(.*),group=1 + type=raw,value=latest + - name: Build and push docker image + uses: docker/build-push-action@v6 + with: + context: . + builder: multiplatform-builder + file: Dockerfile + platforms: linux/amd64 + push: true + pull: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/README.md b/README.md index f0a2d0b..5bd57f9 100644 --- a/README.md +++ b/README.md @@ -118,11 +118,25 @@ The base URL for generated tools is chosen as follows: private network or behind a reverse proxy / gateway that enforces authentication before exposing it publicly. +## Releasing + +Pushing a `release/*` tag triggers the Gitea Actions pipeline, which builds the +Docker image and pushes it to the Gitea container registry: + +```sh +git tag release/0.1.0 +git push origin release/0.1.0 +``` + +This publishes `gitea.woggioni.net/woggioni/xmcp:0.1.0` and +`gitea.woggioni.net/woggioni/xmcp:latest`. + ## Project layout ``` -src/xmcp/config.py env var parsing and validation -src/xmcp/spec.py spec loading, base URL resolution, API client -src/xmcp/server.py FastMCP server construction and entrypoint -Dockerfile multi-stage build (uv builder -> slim runtime, non-root) +src/xmcp/config.py env var parsing and validation +src/xmcp/spec.py spec loading, base URL resolution, API client +src/xmcp/server.py FastMCP server construction and entrypoint +Dockerfile multi-stage build (uv builder -> slim runtime, non-root) +.gitea/workflows/build.yaml release pipeline (tag push -> docker build & push) ```