Repository navigation
45 lines (42 loc) · 1.7 KB
/
Copy pathsquad-agent-binding-check.yml
File metadata and controls
45 lines (42 loc) · 1.7 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
name: Squad Agent Binding Check
on:
workflow_dispatch:
workflow_run:
# "Squad" is the installed gh-aw workflow; "Squad CI" keeps this source
# repository's checker wired to a workflow that exists here.
workflows: [Squad, Squad CI]
types: [completed]
permissions:
contents: read
issues: read
jobs:
check:
name: Historical bindings (not current-run completion)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 #v6
with:
node-version: 22
- name: Collect historical activation records (not run outputs)
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 #v9
with:
script: |
const fs = require('node:fs');
const { pathToFileURL } = require('node:url');
const { join } = require('node:path');
const { collectHistoricalActivationRecords } = await import(pathToFileURL(
join(process.env.GITHUB_WORKSPACE, 'workflows/shared/check-agent-binding.mjs')).href);
const audit = await collectHistoricalActivationRecords({ github, context });
fs.writeFileSync(
`${process.env.RUNNER_TEMP}/activation-comments.json`,
JSON.stringify(audit),
);
- name: Audit historical bindings without asserting current-run completion
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
node scripts/check-agent-binding.mjs
--comments-file="$RUNNER_TEMP/activation-comments.json"
--team-file=".squad/team.md"
--repo="${{ github.repository }}"