Skip to content

feat(workflow): add copilot-setup-steps.yml for Coding Agent environment #1

feat(workflow): add copilot-setup-steps.yml for Coding Agent environment

feat(workflow): add copilot-setup-steps.yml for Coding Agent environment #1

# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT
#
# copilot-setup-steps.yml
# Pre-install tools and dependencies for GitHub Copilot Coding Agent
# Reference: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment
name: "Copilot Setup Steps"
# Auto-run on push/PR to validate the setup workflow
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# Job MUST be named 'copilot-setup-steps' to be recognized by Copilot
copilot-setup-steps:
runs-on: ubuntu-latest
# Minimal permissions; Copilot receives its own token for operations
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.2.2
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v4.1.0
with:
node-version: "20"
cache: "npm"
- name: Install JavaScript dependencies
run: npm ci
- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: "3.11"
- name: Install PowerShell modules
shell: pwsh
run: |
Install-Module -Name PowerShell-Yaml -Force -Scope CurrentUser
- name: Verify tool availability
run: |
echo "=== Tool Versions ==="
node --version
npm --version
python3 --version
pwsh --version
shellcheck --version
echo ""
echo "=== npm Scripts Available ==="
npm run --list