-
Notifications
You must be signed in to change notification settings - Fork 28
104 lines (89 loc) · 3.06 KB
/
Copy path01b-subgraph.yml
File metadata and controls
104 lines (89 loc) · 3.06 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: "01b. Subgraph Extraction"
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch from 01a'
required: true
type: string
workers:
description: 'Number of parallel workers'
required: false
type: number
default: 4
max_concurrent:
description: 'Max concurrent Claude calls'
required: false
type: number
default: 64
force_execute:
description: 'Force execute (ignore skip conditions)'
required: false
type: boolean
default: false
permissions:
contents: write
jobs:
extraction_01b:
if: ${{ github.actor == 'grandchildrice' || github.actor == 'hirorogo' }}
runs-on: self-hosted
env:
CLAUDE_CODE_PERMISSIONS: bypassPermissions
CLAUDE_CODE_MAX_OUTPUT_TOKENS: 100000
steps:
- name: Checkout Branch
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
fetch-depth: 0
- name: Update Scripts and Prompts from Remote
run: |
set -e
echo "Syncing scripts and prompts with remote branch..."
git fetch --prune origin
git checkout origin/${{ github.ref_name }} -- scripts/ prompts/ .github/workflows/ .claude/
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Claude Code
run: |
if command -v claude >/dev/null 2>&1; then
echo "claude already installed; skipping"
else
npm install -g @anthropic-ai/claude-code
fi
- name: Setup MCP Servers
run: FILESYSTEM_DIRS="." bash scripts/setup_mcp.sh
env:
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare Git
run: |
git config --local user.name "Security Agent Bot"
git config --local user.email "bot@nyxfoundation.org"
- name: "Pre-flight: Schema & Config Tests"
run: uv run python3 -m pytest tests/ -v --tb=short
- name: "Step 01b: Extraction (Parallel)"
run: uv run python3 scripts/run_phase.py --phase 01b --workers ${{ inputs.workers }} --max-concurrent ${{ inputs.max_concurrent }} ${{ inputs.force_execute && '--force' || '' }}
env:
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push Results
if: success() || failure()
run: |
git add outputs/ ':!outputs/logs/'
if ! git diff --staged --quiet; then
git add outputs/logs/
git commit -m "01b: extraction"
git push origin "${{ inputs.branch }}" --force-with-lease
fi
- name: Summary
run: |
echo "## Next: Run **01c. Verification**" >> $GITHUB_STEP_SUMMARY
echo "Branch: \`${{ inputs.branch }}\`" >> $GITHUB_STEP_SUMMARY
- name: Upload Logs
uses: actions/upload-artifact@v4
if: always()
with:
name: step-2b-logs-${{ github.run_id }}
path: outputs/logs/
retention-days: 7