-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (97 loc) · 3.66 KB
/
Copy pathimplement.yml
File metadata and controls
104 lines (97 loc) · 3.66 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: olympus-implement
# Reusable dev-agent workflow. The consumer triggers it when the triage agent
# (or a human) adds the `agent:try` label to an issue:
#
# on:
# issues: { types: [labeled] }
# jobs:
# implement:
# if: github.event.label.name == 'agent:try'
# uses: Netis/olympus/.github/workflows/implement.yml@v0.1.0
# permissions: { contents: write, issues: write, pull-requests: write }
# with:
# runner_labels: '["self-hosted","my-runner"]'
# secrets: inherit
#
# The dev agent branches off the default branch, implements within the triaged
# scope, runs the project's build+test command (from .olympus.json), and
# opens a DRAFT PR labelled `auto-agent`. Review/merge is the review workflow's
# job. Nothing here is project-specific.
on:
workflow_call:
inputs:
olympus_repo:
type: string
default: Netis/olympus
olympus_ref:
type: string
default: main
runner_labels:
type: string
default: '["self-hosted"]'
config_path:
type: string
default: .olympus.json
model:
type: string
default: claude-3-5-sonnet-20241022
timeout_minutes:
type: number
default: 120
secrets:
LITELLM_BASE_URL: { required: true }
LITELLM_API_KEY: { required: true }
LITELLM_NO_PROXY: { required: false }
AGENT_GH_TOKEN: { required: true }
AUTO_MERGE_TEAM: { required: false }
# codex harness only: its API key + the staging/testing egress proxy it
# must use (a direct connection is blocked there). Ignored by the claude
# harness. Either set HARNESS_PROXY here or .harness.proxy in .olympus.json.
OPENAI_API_KEY: { required: false }
HARNESS_PROXY: { required: false }
concurrency:
group: olympus-implement-${{ github.event.issue.number }}
cancel-in-progress: false
jobs:
implement:
runs-on: ${{ fromJSON(inputs.runner_labels) }}
timeout-minutes: ${{ inputs.timeout_minutes }}
env:
ANTHROPIC_BASE_URL: ${{ secrets.LITELLM_BASE_URL }}
ANTHROPIC_API_KEY: ${{ secrets.LITELLM_API_KEY }}
ANTHROPIC_MODEL: ${{ inputs.model }}
# codex harness: auth + egress proxy. Empty when unset → config.sh keeps
# any .harness.proxy from the file (a blank env never overrides it).
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OLYMPUS_HARNESS_PROXY: ${{ secrets.HARNESS_PROXY }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
steps:
- name: no_proxy for the model gateway
run: |
{
echo "no_proxy=${{ secrets.LITELLM_NO_PROXY }}"
echo "NO_PROXY=${{ secrets.LITELLM_NO_PROXY }}"
} >> "$GITHUB_ENV"
- name: Checkout consumer repo
uses: actions/checkout@v4
with:
fetch-depth: 0
# PAT so the agent's push re-triggers ci/review (GITHUB_TOKEN pushes
# are suppressed by GitHub's anti-recursion rule).
token: ${{ secrets.AGENT_GH_TOKEN }}
- name: Fetch olympus scripts
uses: actions/checkout@v4
with:
repository: ${{ inputs.olympus_repo }}
ref: ${{ inputs.olympus_ref }}
token: ${{ secrets.AGENT_GH_TOKEN }}
path: _agentops
- name: Implement
env:
OLYMPUS_CONFIG: ${{ inputs.config_path }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
GH_TOKEN: ${{ secrets.AGENT_GH_TOKEN }}
AUTO_MERGE_TEAM: ${{ secrets.AUTO_MERGE_TEAM }}
run: bash _agentops/scripts/agent-bot/run_hephaestus.sh