-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.47 KB
/
Copy pathautopilot-operator.yml
File metadata and controls
64 lines (56 loc) · 1.47 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: Autopilot Operator
on:
schedule:
- cron: "*/10 * * * *"
workflow_dispatch:
permissions:
contents: read
issues: write
pull-requests: write
jobs:
operator:
runs-on: [self-hosted, Windows]
env:
ORG: ${{ vars.ORG }}
GH_TOKEN: ${{ secrets.ORG_AUTOPILOT_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- name: Ensure Codex on PATH
shell: pwsh
run: |
$codexPath = "C:\Program Files\codex"
if (Test-Path $codexPath) {
"PATH=$codexPath;$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
}
- name: Checkout
uses: actions/checkout@v6
with:
clean: false
- name: Tool checks
shell: pwsh
run: |
git --version
gh --version
if (Get-Command codex -ErrorAction SilentlyContinue) {
codex --version
} else {
Write-Host "Codex not found on PATH"
exit 1
}
- name: Validate org mutation token
shell: pwsh
run: |
if (-not $env:GH_TOKEN) {
Write-Host "ORG_AUTOPILOT_TOKEN is not set."
exit 1
}
- name: Validate Codex auth
shell: pwsh
run: |
if (-not $env:OPENAI_API_KEY) {
Write-Host "OPENAI_API_KEY is not set."
exit 1
}
- name: Run operator
shell: pwsh
run: .\scripts\autopilot-operator.ps1