microsoft/hve-core

Public

mirrored fromhttps://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
8aca44624e6d8c8a54051ca7d7fbdd1b27b9073f

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/copilot-setup-steps.yml

85lines · modecode

1# Copyright (c) Microsoft Corporation.
2# SPDX-License-Identifier: MIT
3#
4# copilot-setup-steps.yml
5# Pre-install tools and dependencies for GitHub Copilot Coding Agent
6# Reference: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment
7
8name: "Copilot Setup Steps"
9
10# Copilot coding agent runs these steps internally before starting work.
11# Use workflow_dispatch to manually validate the setup when desired.
12on:
13 workflow_dispatch:
14
15# Minimal permissions
16permissions:
17 contents: read
18
19concurrency:
20 group: ${{ github.workflow }}-${{ github.ref }}
21 cancel-in-progress: false
22
23jobs:
24 # Job MUST be named 'copilot-setup-steps' to be recognized by Copilot
25 copilot-setup-steps:
26 runs-on: ubuntu-latest
27
28 # Minimal permissions; Copilot receives its own token for operations
29 permissions:
30 contents: read
31
32 steps:
33 - name: Checkout code
34 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.2.2
35 with:
36 persist-credentials: false
37
38 - name: Set up Node.js
39 uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v4.1.0
40 with:
41 node-version: "20"
42 cache: "npm"
43
44 # continue-on-error allows Copilot to start work even if dependencies fail,
45 # so it can fix package.json/package-lock.json issues itself
46 - name: Install JavaScript dependencies
47 continue-on-error: true
48 run: npm ci
49
50 - name: Set up Python
51 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
52 with:
53 python-version: "3.11"
54
55 - name: Install actionlint
56 env:
57 ACTIONLINT_VERSION: '1.7.10'
58 ACTIONLINT_SHA256: 'f4c76b71db5755a713e6055cbb0857ed07e103e028bda117817660ebadb4386f'
59 run: |
60 curl -sLO "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
61 echo "${ACTIONLINT_SHA256} actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" | sha256sum -c -
62 tar -xzf "actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" actionlint
63 sudo install actionlint /usr/local/bin/actionlint
64 rm actionlint "actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
65 actionlint --version
66
67 - name: Install PowerShell modules
68 shell: pwsh
69 run: |
70 Install-Module -Name PowerShell-Yaml -Force -Scope CurrentUser
71 Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser
72 Install-Module -Name Pester -RequiredVersion 5.7.1 -Force -Scope CurrentUser
73
74 - name: Verify tool availability
75 run: |
76 echo "=== Tool Versions ==="
77 node --version
78 npm --version
79 python3 --version
80 pwsh --version
81 shellcheck --version
82 actionlint --version
83 echo ""
84 echo "=== npm Scripts Available ==="
85 npm run --list
86