-
Notifications
You must be signed in to change notification settings - Fork 5
93 lines (75 loc) Β· 3.41 KB
/
copilot-setup-steps.yml
File metadata and controls
93 lines (75 loc) Β· 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: "Copilot Setup Steps"
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
env:
GITHUB_TOKEN: ${{ secrets.COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN }}
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN }}
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
contents: read
actions: read
attestations: read
checks: read
deployments: read
issues: write
models: read
discussions: read
pages: read
pull-requests: write
security-events: read
statuses: read
# Steps run before the agent starts working
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# JavaScript/TypeScript setup
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
cache: "npm"
- name: Install dependencies
run: npm ci
env:
NODE_OPTIONS: "--max-old-space-size=4096"
# Pre-install MCP server packages globally
- name: Install MCP server packages globally
run: |
echo "π¦ Installing MCP server packages globally..."
# Install Node.js MCP servers that exist on npm
npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-memory
npm install -g @modelcontextprotocol/server-sequential-thinking
# Pre-cache @playwright/mcp for faster startup
npm install -g @playwright/mcp
echo "β
Node.js MCP server packages installed globally"
# Verify all MCP server installations
- name: Verify MCP server installations
run: |
echo "π Verifying MCP server installations..."
echo "=== Node.js MCP Servers ==="
echo "Checking mcp-server-filesystem..."
which mcp-server-filesystem && echo "β
mcp-server-filesystem found" || echo "β mcp-server-filesystem NOT found"
echo "Checking mcp-server-memory..."
which mcp-server-memory && echo "β
mcp-server-memory found" || echo "β mcp-server-memory NOT found"
echo "Checking mcp-server-sequential-thinking..."
which mcp-server-sequential-thinking && echo "β
mcp-server-sequential-thinking found" || echo "β mcp-server-sequential-thinking NOT found"
echo "Checking @playwright/mcp..."
which mcp-server-playwright 2>/dev/null && echo "β
mcp-server-playwright found" || echo "βΉοΈ @playwright/mcp available via npx"
echo ""
echo "=== HTTP MCP Servers ==="
echo "π GitHub MCP Server: Using HTTP endpoint (https://api.githubcopilot.com/mcp/insiders)"
echo "β
MCP server verification complete"