Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/publish-mcp-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,29 @@ jobs:
cache-to: type=gha,mode=max,scope=funasr-mcp

- name: Make the GHCR package public
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api --method PATCH \
"/orgs/${GITHUB_REPOSITORY_OWNER}/packages/container/funasr-mcp" \
-f visibility=public

- name: Verify the versioned image is publicly pullable
env:
IMAGE_VERSION: ${{ steps.metadata.outputs.version }}
run: |
token="$(curl --fail --show-error --silent --get \
--data-urlencode "service=ghcr.io" \
--data-urlencode "scope=repository:modelscope/funasr-mcp:pull" \
https://ghcr.io/token | jq -r '.token')"
test -n "$token"
curl --fail --show-error --silent \
-H "Authorization: Bearer $token" \
-H "Accept: application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.list.v2+json" \
"https://ghcr.io/v2/modelscope/funasr-mcp/manifests/${IMAGE_VERSION}" \
>/dev/null

- name: Install verified MCP publisher
run: |
archive="$RUNNER_TEMP/mcp-publisher.tar.gz"
Expand Down
4 changes: 2 additions & 2 deletions examples/mcp_server/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "io.github.modelscope/funasr-mcp",
"title": "FunASR",
"description": "Transcribe local audio with FunASR and SenseVoice using private, on-device inference.",
"version": "0.1.0",
"version": "0.1.1",
"websiteUrl": "https://github.com/modelscope/FunASR/tree/main/examples/mcp_server",
"repository": {
"url": "https://github.com/modelscope/FunASR",
Expand All @@ -14,7 +14,7 @@
"packages": [
{
"registryType": "oci",
"identifier": "ghcr.io/modelscope/funasr-mcp:0.1.0",
"identifier": "ghcr.io/modelscope/funasr-mcp:0.1.1",
"runtimeHint": "docker",
"runtimeArguments": [
{
Expand Down
4 changes: 4 additions & 0 deletions examples/mcp_server/test_registry_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ def test_release_workflow_is_versioned_and_oidc_authenticated(self):
self.assertIn("docker/build-push-action@v7", workflow)
self.assertIn("docker/setup-buildx-action@v4", workflow)
self.assertIn("docker/login-action@v4", workflow)
self.assertIn("continue-on-error: true", workflow)
self.assertIn("Verify the versioned image is publicly pullable", workflow)
self.assertIn("scope=repository:modelscope/funasr-mcp:pull", workflow)
self.assertIn("https://ghcr.io/v2/modelscope/funasr-mcp/manifests/${IMAGE_VERSION}", workflow)
self.assertNotIn("actions/checkout@v4", workflow)
self.assertNotIn("actions/setup-python@v5", workflow)
self.assertNotIn("docker/build-push-action@v6", workflow)
Expand Down
Loading