Skip to content

Commit dac1a25

Browse files
committed
Add dockerfile label and clean script
1 parent b38db66 commit dac1a25

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

.github/workflows/registry-releaser.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,25 @@ jobs:
2626

2727
- name: Install MCP Publisher
2828
run: |
29-
# Build publisher from source (requires Go)
30-
git clone https://github.com/modelcontextprotocol/registry publisher-repo
31-
cd publisher-repo
32-
make publisher
33-
cp bin/mcp-publisher ../mcp-publisher
34-
cd ..
35-
chmod +x mcp-publisher
29+
git clone --quiet https://github.com/modelcontextprotocol/registry publisher-repo
30+
cd publisher-repo && make publisher > /dev/null && cd ..
31+
cp publisher-repo/bin/mcp-publisher . && chmod +x mcp-publisher
3632
3733
- name: Update server.json version
3834
run: |
3935
if [[ "${{ github.ref_type }}" == "tag" ]]; then
40-
# Use the tag that triggered the workflow
4136
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
42-
echo "Using triggered tag: ${{ github.ref_name }}"
4337
else
44-
# Fallback to latest tag (for manual triggers)
4538
LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)
46-
if [ -z "$LATEST_TAG" ]; then
47-
echo "❌ No release tag found. Cannot determine version."
48-
exit 1
49-
fi
39+
[ -z "$LATEST_TAG" ] && { echo "No release tag found"; exit 1; }
5040
TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//')
51-
echo "Using latest tag: $LATEST_TAG"
5241
fi
5342
sed -i "s/\${VERSION}/$TAG_VERSION/g" server.json
54-
echo "Updated server.json version to $TAG_VERSION"
43+
echo "Version: $TAG_VERSION"
5544
56-
- name: Display updated server.json
45+
- name: Validate configuration
5746
run: |
58-
echo "Final server.json contents:"
59-
cat server.json
60-
echo ""
61-
echo "JSON validation check:"
62-
python3 -m json.tool server.json > /dev/null && echo "✅ Valid JSON" || echo "❌ Invalid JSON"
47+
python3 -m json.tool server.json > /dev/null && echo "Configuration valid" || exit 1
6348
6449
- name: Login to MCP Registry (OIDC)
6550
run: ./mcp-publisher login github-oidc

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ RUN --mount=type=cache,target=/go/pkg/mod \
1818

1919
# Make a stage to run the app
2020
FROM gcr.io/distroless/base-debian12
21+
22+
# Add required MCP server annotation
23+
LABEL io.modelcontextprotocol.server.name="io.github.github/github-mcp-server"
24+
2125
# Set the working directory
2226
WORKDIR /server
2327
# Copy the binary from the build stage

0 commit comments

Comments
 (0)