-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (69 loc) · 2.22 KB
/
Copy pathagent-factory.yml
File metadata and controls
73 lines (69 loc) · 2.22 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
name: agent-factory
on:
workflow_dispatch:
inputs:
publish_issue:
description: "Update the human-reviewed corpus audit issue"
required: false
default: false
type: boolean
schedule:
- cron: "41 4 * * 2"
permissions:
contents: read
jobs:
corpus-audit:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
- run: pip install -e .
- uses: actions/cache@v6
with:
path: .agentguard-corpus-state.json
key: corpus-state-${{ github.run_id }}
restore-keys: |
corpus-state-
- name: Scan, deduplicate, diff, and generate repair patches
run: |
args=(--manifest docs/corpus/manifest.json --output build/corpus-audit --jobs 3)
if [[ -f .agentguard-corpus-state.json ]]; then
args+=(--state .agentguard-corpus-state.json)
fi
python3 tools/corpus_audit.py "${args[@]}"
cp build/corpus-audit/state.json .agentguard-corpus-state.json
- name: Verify the audit against its schema before human review
run: python3 tools/validate_audit.py build/corpus-audit/audit.json
- uses: actions/upload-artifact@v7
with:
name: agentguard-corpus-audit
path: build/corpus-audit/
if-no-files-found: error
publish-reviewed-summary:
if: github.event_name == 'workflow_dispatch' && inputs.publish_issue
needs: corpus-audit
runs-on: ubuntu-latest
timeout-minutes: 10
environment: corpus-publish
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
name: agentguard-corpus-audit
path: build/corpus-audit
- name: Create or update one deduplicated audit issue
env:
GH_TOKEN: ${{ github.token }}
run: |
python3 tools/publish_audit_issue.py \
--report build/corpus-audit/report.md \
--repo "${{ github.repository }}" \
--title "AgentGuard corpus audit" \
--confirm-publish