Skip to content

Commit 8f11903

Browse files
authored
Merge branch 'main' into dependabot/go_modules/github.com/spf13/viper-1.21.0
2 parents 045137d + 5e5e80a commit 8f11903

Some content is hidden

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

62 files changed

+6328
-2535
lines changed

.github/workflows/code-scanning.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: actions/checkout@v5
3939

4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v3
41+
uses: github/codeql-action/init@v4
4242
with:
4343
languages: ${{ matrix.language }}
4444
build-mode: ${{ matrix.build-mode }}
@@ -52,13 +52,13 @@ jobs:
5252
threat-models: [ ]
5353
- name: Setup proxy for registries
5454
id: proxy
55-
uses: github/codeql-action/start-proxy@v3
55+
uses: github/codeql-action/start-proxy@v4
5656
with:
5757
registries_credentials: ${{ secrets.GITHUB_REGISTRIES_PROXY }}
5858
language: ${{ matrix.language }}
5959

6060
- name: Configure
61-
uses: github/codeql-action/resolve-environment@v3
61+
uses: github/codeql-action/resolve-environment@v4
6262
id: resolve-environment
6363
with:
6464
language: ${{ matrix.language }}
@@ -70,10 +70,10 @@ jobs:
7070
cache: false
7171

7272
- name: Autobuild
73-
uses: github/codeql-action/autobuild@v3
73+
uses: github/codeql-action/autobuild@v4
7474

7575
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@v3
76+
uses: github/codeql-action/analyze@v4
7777
env:
7878
CODEQL_PROXY_HOST: ${{ steps.proxy.outputs.proxy_host }}
7979
CODEQL_PROXY_PORT: ${{ steps.proxy.outputs.proxy_port }}

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# https://github.com/sigstore/cosign-installer
4747
- name: Install cosign
4848
if: github.event_name != 'pull_request'
49-
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 #v3.10.0
49+
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad #v4.0.0
5050
with:
5151
cosign-release: "v2.2.4"
5252

@@ -60,7 +60,7 @@ jobs:
6060
# https://github.com/docker/login-action
6161
- name: Log into registry ${{ env.REGISTRY }}
6262
if: github.event_name != 'pull_request'
63-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
63+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
6464
with:
6565
registry: ${{ env.REGISTRY }}
6666
username: ${{ github.actor }}
@@ -127,3 +127,4 @@ jobs:
127127
# This step uses the identity token to provision an ephemeral certificate
128128
# against the sigstore community Fulcio instance.
129129
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
130+

.github/workflows/moderator.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: AI Moderator
2+
on:
3+
issues:
4+
types: [opened]
5+
issue_comment:
6+
types: [created]
7+
pull_request_review_comment:
8+
types: [created]
9+
10+
jobs:
11+
spam-detection:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
models: read
17+
contents: read
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: github/ai-moderator@v1
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
spam-label: 'spam'
24+
ai-label: 'ai-generated'
25+
minimize-detected-comments: true
26+
enable-spam-detection: true
27+
enable-link-spam-detection: true
28+
enable-ai-detection: true

.github/workflows/registry-releaser.yml

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,67 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v5
1818

19+
- name: Setup Go
20+
uses: actions/setup-go@v6
21+
with:
22+
go-version: "stable"
23+
1924
- name: Fetch tags
20-
run: git 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
2150
2251
- name: Install MCP Publisher
2352
run: |
24-
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
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
2556
2657
- name: Update server.json version
2758
run: |
2859
if [[ "${{ github.ref_type }}" == "tag" ]]; then
29-
# Use the tag that triggered the workflow
3060
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
31-
echo "Using triggered tag: ${{ github.ref_name }}"
3261
else
33-
# Fallback to latest tag (for manual triggers)
3462
LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)
35-
if [ -z "$LATEST_TAG" ]; then
36-
echo "❌ No release tag found. Cannot determine version."
37-
exit 1
38-
fi
63+
[ -z "$LATEST_TAG" ] && { echo "No release tag found"; exit 1; }
3964
TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//')
4065
echo "Using latest tag: $LATEST_TAG"
4166
fi
4267
sed -i "s/\${VERSION}/$TAG_VERSION/g" server.json
43-
echo "Updated server.json version to $TAG_VERSION"
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
4478
45-
- name: Login to MCP Registry
79+
- name: Login to MCP Registry (OIDC)
4680
run: ./mcp-publisher login github-oidc
4781

4882
- name: Publish to MCP Registry

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.25.1-alpine AS build
1+
FROM golang:1.25.3-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)