Fix critical issues in MCP server release workflow
- Fix Docker tag format: use version only (0.4.0) instead of mcp-v0.4.0 - Add Python 3.11 setup for tomllib compatibility - Add workflow_dispatch trigger for testing without creating tags - Add conditional push logic for manual testing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9e6b1cd085
commit
17f727d957
1 changed files with 15 additions and 3 deletions
18
.github/workflows/release-mcp-server.yml
vendored
18
.github/workflows/release-mcp-server.yml
vendored
|
|
@ -3,6 +3,13 @@ name: Release MCP Server
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ["mcp-v*.*.*"]
|
tags: ["mcp-v*.*.*"]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
push_image:
|
||||||
|
description: "Push image to registry (unchecked for testing)"
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.io
|
REGISTRY: docker.io
|
||||||
|
|
@ -20,6 +27,11 @@ jobs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python 3.11
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Extract and validate version
|
- name: Extract and validate version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -32,9 +44,9 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "version=$PROJECT_VERSION" >> $GITHUB_OUTPUT
|
echo "version=$PROJECT_VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "tag=mcp-v$PROJECT_VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
|
if: github.event_name != 'workflow_dispatch' || inputs.push_image
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
|
|
@ -50,7 +62,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=${{ steps.version.outputs.tag }}
|
type=raw,value=${{ steps.version.outputs.version }}
|
||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
|
|
@ -59,6 +71,6 @@ jobs:
|
||||||
project: v9jv1mlpwc
|
project: v9jv1mlpwc
|
||||||
context: ./mcp_server
|
context: ./mcp_server
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: ${{ github.event_name != 'workflow_dispatch' || inputs.push_image }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue