-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (65 loc) · 2.63 KB
/
agent-onboarding.yml
File metadata and controls
73 lines (65 loc) · 2.63 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 / Onboarding / Check Setup
on:
workflow_dispatch:
inputs:
memory_ref:
description: "Memory branch to check"
required: false
rubrics_ref:
description: "Rubrics branch to check"
required: false
permissions:
contents: read
issues: write
id-token: write # required for GitHub Actions OIDC broker exchange
concurrency:
group: agent-onboarding-${{ github.repository }}
cancel-in-progress: false
jobs:
check:
if: vars.AGENT_ENABLED != 'false'
runs-on: ${{ fromJson(vars.AGENT_RUNS_ON || '["ubuntu-latest"]') }}
env:
MEMORY_REF: ${{ inputs.memory_ref || vars.AGENT_MEMORY_REF || 'agent/memory' }}
RUBRICS_REF: ${{ inputs.rubrics_ref || vars.AGENT_RUBRICS_REF || 'agent/rubrics' }}
steps:
- uses: actions/checkout@v4
- name: Resolve GitHub auth
id: auth
uses: ./.github/actions/resolve-github-auth
with:
app_id: ${{ secrets.AGENT_APP_ID }}
app_private_key: ${{ secrets.AGENT_APP_PRIVATE_KEY }}
pat: ${{ secrets.AGENT_PAT }}
fallback_token: ${{ github.token }}
- name: Resolve agent provider readiness
id: provider
uses: ./.github/actions/resolve-agent-provider
with:
route: onboarding
default_provider: ${{ vars.AGENT_DEFAULT_PROVIDER || 'auto' }}
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
claude_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
model_policy: ${{ vars.AGENT_MODEL_POLICY || '' }}
required: "false"
- name: Setup agent runtime
uses: ./.github/actions/setup-agent-runtime
with:
install_codex: "false"
install_claude: "false"
- name: Create or update onboarding issue
id: onboarding
env:
AUTH_MODE: ${{ steps.auth.outputs.auth_mode }}
AGENT_PROVIDER: ${{ steps.provider.outputs.provider }}
AGENT_PROVIDER_REASON: ${{ steps.provider.outputs.reason }}
CLAUDE_CODE_OAUTH_TOKEN_CONFIGURED: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN != '' }}
ANTHROPIC_API_KEY_CONFIGURED: ${{ secrets.ANTHROPIC_API_KEY != '' }}
GH_TOKEN: ${{ steps.auth.outputs.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
MEMORY_REF: ${{ env.MEMORY_REF }}
OPENAI_API_KEY_CONFIGURED: ${{ secrets.OPENAI_API_KEY != '' }}
RUBRICS_REF: ${{ env.RUBRICS_REF }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: node .agent/dist/cli/onboarding-check.js