-
Notifications
You must be signed in to change notification settings - Fork 67.6k
61 lines (53 loc) · 2.22 KB
/
Copy pathcopilot-setup-steps.yml
File metadata and controls
61 lines (53 loc) · 2.22 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
# Copilot cloud agent setup steps
#
# This is a special-name workflow recognized by Copilot cloud agent.
# When a cloud agent session starts (via GitHub issue assignment or the
# Copilot UI), these steps run first to bootstrap the development
# environment before the agent begins working.
#
# The workflow_dispatch trigger allows manual testing of the setup steps.
# This is NOT a regular CI workflow — it does not run on push or PR events.
#
# See also:
# .github/copilot-instructions.md — always-on agent instructions
# .github/instructions/ — contextual instruction files
# .github/prompts/ — on-demand prompt files (e.g. /code-review)
name: 'Copilot Setup Steps'
on:
workflow_dispatch:
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
permissions:
contents: read
id-token: write
env:
ELASTICSEARCH_URL: http://localhost:9200/
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
owner: github
repositories: docs-early-access
- uses: ./.github/actions/node-npm-setup
# Search and language test suites require a running Elasticsearch instance.
- uses: ./.github/actions/setup-elasticsearch
with:
token: ${{ steps.app-token.outputs.token }}
# docs-internal has early-access content that must be fetched separately.
- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
with:
token: ${{ steps.app-token.outputs.token }}
# Many test suites depend on Next.js build artifacts.
- name: Build
run: npm run build
# Populate Elasticsearch with fixture data so search/language tests work.
- name: Index fixtures into the local Elasticsearch
run: npm run index-test-fixtures