ci: publish docker image on release tags
CI / Build and push docker image (push) Successful in 1m44s

Gitea Actions workflow triggered by release/* tags: builds the image
with the hostinger runner and pushes
gitea.woggioni.net/woggioni/xmcp:<version> and :latest.

Also document the release process in the README.
This commit is contained in:
2026-10-19 02:43:15 +00:00
parent d0fc0c1bc4
commit c688f323c1
2 changed files with 58 additions and 4 deletions
+40
View File
@@ -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 }}
+18 -4
View File
@@ -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)
```