Repository navigation
67 lines (64 loc) · 2.57 KB
/
Copy pathpromote.yml
File metadata and controls
67 lines (64 loc) · 2.57 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
# Promotes approved drafts in midstream forks upstream. Which repositories
# qualify comes from repository metadata, never from a switch here.
# A manual run may instead preview the one-time draft-body repair
# (agent-board issue 1002) with the same verified binary and token; the
# preview writes nothing. Apply is deliberately not offered: it waits for
# the footer fix in the pin and a dispatch gate limited to the controller.
# Schedules have no inputs, so they only ever promote.
name: promote
on:
schedule:
- cron: '17,32,47,2 * * * *'
workflow_dispatch:
inputs:
repair:
description: Preview the draft-body repair instead of promoting; writes nothing
type: choice
options: ['off', preview]
default: 'off'
permissions: {}
# Two promoters could publish the same approved head concurrently.
concurrency:
group: promote
cancel-in-progress: false
env:
AGENT_BOARD_REV: 183ed445b9b0b7b5510454e03e794a31c0efbb5d
jobs:
promote:
if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
runs-on: ubuntu-26.04
timeout-minutes: 20
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- id: just
continue-on-error: true
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
with:
just-version: 1.58.0
- if: steps.just.outcome == 'failure'
run: cargo install --locked --version 1.58.0 just && echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install verified agent-board
timeout-minutes: 10
env:
GH_TOKEN: ${{ github.token }}
run: just build-agent-board "$AGENT_BOARD_REV"
- name: Promote approved drafts
if: ${{ inputs.repair != 'preview' }}
timeout-minutes: 8
env:
GH_TOKEN: ${{ secrets.CGWALTERS_BOT_PAT }}
AGENT_BOARD: ${{ runner.temp }}/agent-board/bin/agent-board
run: '"$AGENT_BOARD" promote --config .github/pass.json --apply --max-writes 4'
# The preview's before/after, unchanged and held lines are this run's
# public, human-readable log; there is no machine-readable report.
- name: Preview draft-body repair
if: ${{ inputs.repair == 'preview' }}
timeout-minutes: 8
env:
GH_TOKEN: ${{ secrets.CGWALTERS_BOT_PAT }}
AGENT_BOARD: ${{ runner.temp }}/agent-board/bin/agent-board
run: '"$AGENT_BOARD" promote --config .github/pass.json --repair-bodies'