release-docker.yml•2.71 kB
name: Release Docker
on:
push:
tags: ["v*.*.*"]
env:
IMAGE_NAME: docker.io/zenmldocker/mcp-zenml
permissions:
contents: write
jobs:
docker:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- 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: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
labels: |
org.opencontainers.image.title=ZenML MCP Server
org.opencontainers.image.description=Model Context Protocol server for ZenML
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.licenses=MIT
io.modelcontextprotocol.server.name=io.github.zenml-io/mcp-zenml
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Install MCP Publisher
run: |
# Build publisher from source (requires Go)
git clone https://github.com/modelcontextprotocol/registry publisher-repo
cd publisher-repo
make publisher
cp bin/mcp-publisher ../mcp-publisher
cd ..
chmod +x mcp-publisher
- name: Login to MCP Registry (OIDC)
run: ./mcp-publisher login github-oidc
- name: Publish to MCP Registry
run: ./mcp-publisher publish
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Build MCP bundle
run: bash scripts/build_mcpb.sh
- name: Create GitHub Release (auto notes)
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
files: mcp-zenml.mcpb
generate_release_notes: true