Skip to content

Commit baca9f4

Browse files
Merge branch 'main' into main
2 parents c0769dd + 66fabb7 commit baca9f4

63 files changed

Lines changed: 6301 additions & 1395 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/close-inactive-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
issues: write
1515
pull-requests: write
1616
steps:
17-
- uses: actions/stale@v9
17+
- uses: actions/stale@v10
1818
with:
1919
days-before-issue-stale: ${{ env.PR_DAYS_BEFORE_STALE }}
2020
days-before-issue-close: ${{ env.PR_DAYS_BEFORE_CLOSE }}

.github/workflows/code-scanning.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
with:
6464
language: ${{ matrix.language }}
6565
- name: Setup Go
66-
uses: actions/setup-go@v5
66+
uses: actions/setup-go@v6
6767
if: matrix.language == 'go' && fromJSON(steps.resolve-environment.outputs.environment).configuration.go.version
6868
with:
6969
go-version: ${{ fromJSON(steps.resolve-environment.outputs.environment).configuration.go.version }}

.github/workflows/docker-publish.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ on:
1414
tags: ["v*.*.*"]
1515
pull_request:
1616
branches: ["main", "next"]
17+
workflow_dispatch:
18+
inputs:
19+
description:
20+
required: false
21+
description: "Description of the run."
22+
type: string
23+
default: "Manual run"
1724

1825
env:
1926
# Use docker.io for Docker Hub if empty
@@ -39,21 +46,21 @@ jobs:
3946
# https://github.com/sigstore/cosign-installer
4047
- name: Install cosign
4148
if: github.event_name != 'pull_request'
42-
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
49+
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 #v3.10.0
4350
with:
4451
cosign-release: "v2.2.4"
4552

4653
# Set up BuildKit Docker container builder to be able to build
4754
# multi-platform images and export cache
4855
# https://github.com/docker/setup-buildx-action
4956
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
57+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
5158

5259
# Login against a Docker registry except on PR
5360
# https://github.com/docker/login-action
5461
- name: Log into registry ${{ env.REGISTRY }}
5562
if: github.event_name != 'pull_request'
56-
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
63+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
5764
with:
5865
registry: ${{ env.REGISTRY }}
5966
username: ${{ github.actor }}
@@ -94,7 +101,7 @@ jobs:
94101
# https://github.com/docker/build-push-action
95102
- name: Build and push Docker image
96103
id: build-and-push
97-
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
104+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
98105
with:
99106
context: .
100107
push: ${{ github.event_name != 'pull_request' }}
@@ -120,3 +127,4 @@ jobs:
120127
# This step uses the identity token to provision an ephemeral certificate
121128
# against the sigstore community Fulcio instance.
122129
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
130+

.github/workflows/docs-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Set up Go
20-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@v6
2121
with:
2222
go-version-file: 'go.mod'
2323

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v5
1919

2020
- name: Set up Go
21-
uses: actions/setup-go@v5
21+
uses: actions/setup-go@v6
2222
with:
2323
go-version-file: "go.mod"
2424

.github/workflows/goreleaser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Set up Go
20-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@v6
2121
with:
2222
go-version-file: "go.mod"
2323

2424
- name: Download dependencies
2525
run: go mod download
2626

2727
- name: Run GoReleaser
28-
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552
28+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a
2929
with:
3030
distribution: goreleaser
3131
# GoReleaser version
@@ -37,7 +37,7 @@ jobs:
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3838

3939
- name: Generate signed build provenance attestations for workflow artifacts
40-
uses: actions/attest-build-provenance@v2
40+
uses: actions/attest-build-provenance@v3
4141
with:
4242
subject-path: |
4343
dist/*.tar.gz

.github/workflows/license-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/checkout@v5
1515

1616
- name: Set up Go
17-
uses: actions/setup-go@v5
17+
uses: actions/setup-go@v6
1818
with:
1919
go-version-file: "go.mod"
2020
- name: check licenses

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v5
17-
- uses: actions/setup-go@v5
17+
- uses: actions/setup-go@v6
1818
with:
1919
go-version: stable
2020
- name: golangci-lint
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Publish to MCP Registry
2+
3+
on:
4+
push:
5+
tags: ["v*"] # Triggers on version tags like v1.0.0
6+
workflow_dispatch: # Allow manual triggering
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # Required for OIDC authentication
13+
contents: read
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v5
18+
19+
- name: Setup Go
20+
uses: actions/setup-go@v6
21+
with:
22+
go-version: "stable"
23+
24+
- name: Fetch tags
25+
run: |
26+
if [[ "${{ github.ref_type }}" != "tag" ]]; then
27+
git fetch --tags
28+
else
29+
echo "Skipping tag fetch - already on tag ${{ github.ref_name }}"
30+
fi
31+
32+
- name: Wait for Docker image
33+
run: |
34+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
35+
TAG="${{ github.ref_name }}"
36+
else
37+
TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
38+
fi
39+
IMAGE="ghcr.io/github/github-mcp-server:$TAG"
40+
41+
for i in {1..10}; do
42+
if docker manifest inspect "$IMAGE" &>/dev/null; then
43+
echo "✅ Docker image ready: $TAG"
44+
break
45+
fi
46+
[ $i -eq 10 ] && { echo "❌ Timeout waiting for $TAG after 5 minutes"; exit 1; }
47+
echo "⏳ Waiting for Docker image ($i/10)..."
48+
sleep 30
49+
done
50+
51+
- name: Install MCP Publisher
52+
run: |
53+
git clone --quiet https://github.com/modelcontextprotocol/registry publisher-repo
54+
cd publisher-repo && make publisher > /dev/null && cd ..
55+
cp publisher-repo/bin/mcp-publisher . && chmod +x mcp-publisher
56+
57+
- name: Update server.json version
58+
run: |
59+
if [[ "${{ github.ref_type }}" == "tag" ]]; then
60+
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
61+
else
62+
LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)
63+
[ -z "$LATEST_TAG" ] && { echo "No release tag found"; exit 1; }
64+
TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//')
65+
echo "Using latest tag: $LATEST_TAG"
66+
fi
67+
sed -i "s/\${VERSION}/$TAG_VERSION/g" server.json
68+
echo "Version: $TAG_VERSION"
69+
70+
- name: Validate configuration
71+
run: |
72+
python3 -m json.tool server.json > /dev/null && echo "Configuration valid" || exit 1
73+
74+
- name: Display final server.json
75+
run: |
76+
echo "Final server.json contents:"
77+
cat server.json
78+
79+
- name: Login to MCP Registry (OIDC)
80+
run: ./mcp-publisher login github-oidc
81+
82+
- name: Publish to MCP Registry
83+
run: ./mcp-publisher publish

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.24.4-alpine AS build
1+
FROM golang:1.25.1-alpine AS build
22
ARG VERSION="dev"
33

44
# Set the working directory
@@ -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)