-
Notifications
You must be signed in to change notification settings - Fork 526
42 lines (34 loc) · 1.29 KB
/
copilot-setup-steps.yml
File metadata and controls
42 lines (34 loc) · 1.29 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
# Copilot Cloud Agent – Environment Setup
#
# This workflow is invoked automatically by GitHub Copilot infrastructure to
# prepare the agent's sandbox before it works on tasks in this repository.
# It does NOT run on push/PR events.
#
# Registry patching: The project's .npmrc and yarn.lock reference an Azure
# Artifacts private feed that requires authentication unavailable in the
# Copilot sandbox. We swap the registry URL to the public Yarn registry so
# that `yarn install` succeeds without credentials.
name: "Copilot Setup Steps"
on: workflow_dispatch
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Yarn
run: npm install -g yarn
- name: Bypass private Azure Artifacts registry
run: |
mv .npmrc .npmrc.bak
sed -i 's|https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/|https://registry.yarnpkg.com/|g' yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Validate – run backend tests
run: yarn backendTests