feat: Add automated Docker image usage instructions and PR comments
- Generate comprehensive usage instructions in workflow summary after Docker build - Include exact docker pull commands with built image tags - Auto-generate Claude Desktop configuration examples - Add automatic PR comments with testing instructions for +docker builds - Show expected image tags (pr-X, main-sha) in PR comments - Include ready-to-use configuration snippets for immediate testing - Link to GitHub Container Registry and Actions for monitoring Now when Docker images are built, users get: - Step-by-step usage instructions in workflow summary - PR comments with exact pull commands and config - Copy-paste ready Claude Desktop configurations - Direct links to monitor build progress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
41
.github/workflows/auto-version.yml
vendored
41
.github/workflows/auto-version.yml
vendored
@@ -177,6 +177,47 @@ jobs:
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/dispatches" \
|
||||
-d '{"event_type":"docker-build","client_payload":{"pr_number":"${{ github.event.pull_request.number }}","pr_title":"${{ github.event.pull_request.title }}","commit_sha":"${{ github.sha }}"}}'
|
||||
|
||||
# Add comment to PR about Docker build
|
||||
COMMENT_BODY="🐳 **Docker Image Build Triggered**
|
||||
|
||||
This PR triggered a Docker image build because of the \`+docker\` suffix in the title.
|
||||
|
||||
**Expected Image Tags:**
|
||||
- \`ghcr.io/${{ github.repository_owner }}/gemini-mcp-server:pr-${{ github.event.pull_request.number }}\`
|
||||
- \`ghcr.io/${{ github.repository_owner }}/gemini-mcp-server:main-${{ github.sha }}\`
|
||||
|
||||
**To test the image after build completes:**
|
||||
\`\`\`bash
|
||||
docker pull ghcr.io/${{ github.repository_owner }}/gemini-mcp-server:pr-${{ github.event.pull_request.number }}
|
||||
\`\`\`
|
||||
|
||||
**Claude Desktop config for testing:**
|
||||
\`\`\`json
|
||||
{
|
||||
\"mcpServers\": {
|
||||
\"gemini\": {
|
||||
\"command\": \"docker\",
|
||||
\"args\": [
|
||||
\"run\", \"--rm\", \"-i\",
|
||||
\"-e\", \"GEMINI_API_KEY\",
|
||||
\"ghcr.io/${{ github.repository_owner }}/gemini-mcp-server:pr-${{ github.event.pull_request.number }}\"
|
||||
],
|
||||
\"env\": {
|
||||
\"GEMINI_API_KEY\": \"your-api-key-here\"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
\`\`\`
|
||||
|
||||
View the build progress in the [Actions tab](https://github.com/${{ github.repository }}/actions)."
|
||||
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
|
||||
-d "{\"body\":\"$COMMENT_BODY\"}"
|
||||
fi
|
||||
|
||||
- name: Summary
|
||||
|
||||
Reference in New Issue
Block a user