chore: move mcp servers to file

This commit is contained in:
andig 2025-07-01 11:07:48 +02:00
parent 8d62490a07
commit 857c10aed8

View file

@ -12,21 +12,44 @@ jobs:
contents: read
issues: write
steps:
- name: Setup GitHub MCP Server
run: |
mkdir -p /tmp/mcp-config
cat > /tmp/mcp-config/mcp-servers.json << 'EOF'
{
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server:sha-7aced2b"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.GITHUB_TOKEN }}"
}
}
}
EOF
- name: Run Claude Code
uses: anthropics/claude-code-base-action@beta
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mcp_servers: |
{
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.GITHUB_TOKEN }}"
}
}
}
mcp_config: /tmp/mcp-config/mcp-servers.json
# mcp_servers: |
# {
# "github": {
# "command": "npx",
# "args": ["-y", "@modelcontextprotocol/server-github"],
# "env": {
# "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.GITHUB_TOKEN }}"
# }
# }
# }
prompt: |
You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list.