Repository navigation
75 lines (70 loc) · 2.66 KB
/
Copy pathcontroller.yml
File metadata and controls
75 lines (70 loc) · 2.66 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
68
69
70
71
72
73
74
75
name: Controller (labels only)
# Phase 1 of docs/autonomous-dev.md; see docs/controller.md. A deterministic, label-only controller: no LLM,
# no secrets, only the built-in GITHUB_TOKEN. It never merges, approves, comments on or closes anything and
# never checks out or runs a PR or issue: the issue/PR text is data for a regex, the changed files are read
# through the API. Script and rules come from the default branch.
#
# DRY RUN BY DEFAULT: the `plan` job only reads (read-only token) and writes the proposed label changes to the
# job summary. The `apply` job, the only one with a write permission, runs only when the repository variable
# CONTROLLER_LIVE is exactly `true`. AGENT_PAUSE=true stops everything. Turn it off entirely: disable this
# workflow in the Actions tab or delete the file.
on:
schedule:
- cron: '7,37 * * * *'
workflow_dispatch:
concurrency:
group: controller
cancel-in-progress: false
permissions: {}
jobs:
plan:
name: plan (read only)
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
issues: read
pull-requests: read
outputs:
live: ${{ steps.plan.outputs.live }}
plan: ${{ steps.plan.outputs.plan }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
- id: plan
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
CONTROLLER_LIVE: ${{ vars.CONTROLLER_LIVE }}
AGENT_PAUSE: ${{ vars.AGENT_PAUSE }}
run: node .github/scripts/controller.mjs plan
apply:
name: apply labels (live only)
needs: plan
if: needs.plan.outputs.live == 'true' && vars.CONTROLLER_LIVE == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
issues: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
- env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
CONTROLLER_LIVE: ${{ vars.CONTROLLER_LIVE }}
AGENT_PAUSE: ${{ vars.AGENT_PAUSE }}
PLAN: ${{ needs.plan.outputs.plan }}
run: node .github/scripts/controller.mjs apply