forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 2.01 KB
/
copilot-setup-steps.yml
File metadata and controls
64 lines (55 loc) · 2.01 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
name: "Copilot Setup Steps"
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1000
- name: Bootstrap
if: success()
run: |-
$title = 'Import Build.psm1'
Write-Host "::group::$title"
Import-Module ./build.psm1 -Verbose -ErrorAction Stop
Write-LogGroupEnd -Title $title
$title = 'Switch to public feed'
Write-LogGroupStart -Title $title
Switch-PSNugetConfig -Source Public
Write-LogGroupEnd -Title $title
$title = 'Bootstrap'
Write-LogGroupStart -Title $title
Start-PSBootstrap -Scenario DotNet
Write-LogGroupEnd -Title $title
$title = 'Install .NET Tools'
Write-LogGroupStart -Title $title
Start-PSBootstrap -Scenario Tools
Write-LogGroupEnd -Title $title
$title = 'Sync Tags'
Write-LogGroupStart -Title $title
Sync-PSTags -AddRemoteIfMissing
Write-LogGroupEnd -Title $title
$title = 'Setup .NET environment variables'
Write-LogGroupStart -Title $title
Find-DotNet -SetDotnetRoot
Write-LogGroupEnd -Title $title
shell: pwsh
- name: Install PowerShell.MCP
shell: pwsh
run: |
Install-PSResource -Name 'PowerShell.MCP' -Scope CurrentUser -TrustRepository
$proxy = Get-ChildItem -Path ($env:PSModulePath -split ':') -Filter 'PowerShell.MCP.Proxy' -Recurse -ErrorAction SilentlyContinue |
Where-Object { $_.FullName -match 'linux-x64' } |
Select-Object -First 1 -ExpandProperty FullName
chmod +x $proxy
New-Item -ItemType SymbolicLink -Path '/usr/local/bin/PowerShell.MCP.Proxy' -Target $proxy -Force