-
-
Notifications
You must be signed in to change notification settings - Fork 795
67 lines (56 loc) · 2.1 KB
/
copilot-setup-steps.yml
File metadata and controls
67 lines (56 loc) · 2.1 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
name: Copilot Setup Steps
on:
workflow_dispatch:
push:
paths: [.github/workflows/copilot-setup-steps.yml]
pull_request:
paths: [.github/workflows/copilot-setup-steps.yml]
# Note: global env vars are NOT used here — they are not reliable in all
# GitHub Actions contexts (e.g. Copilot setup steps). Values are inlined
# directly into each step that needs them.
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
# Go + Node versions match your helper
- uses: actions/setup-go@v6
with:
go-version: "1.25.6"
cache-dependency-path: go.sum
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: package-lock.json
# Zig is used by your Linux CGO builds (kept available, but we won't build here)
- uses: mlugg/setup-zig@v2
# Task CLI for your Taskfile
- uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Git HTTPS so deps resolve non-interactively
- name: Force git deps to HTTPS
run: |
git config --global url.https://github.com/.insteadof ssh://git@github.com/
git config --global url.https://github.com/.insteadof git@github.com:
# Warm caches only (no builds)
- uses: nick-fields/retry@v3
name: npm ci
with:
command: npm ci --no-audit --no-fund
retry_on: error
max_attempts: 3
timeout_minutes: 5
env:
GIT_ASKPASS: "echo"
GIT_TERMINAL_PROMPT: "0"
- name: Pre-fetch Go modules
env:
GOTOOLCHAIN: auto
run: |
go version
go mod download