-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.62 KB
/
opencode.yml
File metadata and controls
53 lines (48 loc) · 1.62 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
name: opencode
on:
issue_comment:
types: [created, edited]
pull_request_review_comment:
types: [created, edited]
jobs:
opencode:
if: |
github.actor == 'Jordonbc' && (
startsWith(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, '\n/oc') ||
startsWith(github.event.comment.body, '/opencode') ||
contains(github.event.comment.body, '\n/opencode')
)
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: primary
id: opencode_primary
continue-on-error: true
# Pinned to an immutable commit for CodeQL (tag: github-v1.2.17)
uses: anomalyco/opencode/github@2410593023d2c61f05123c9b0faf189a28dfbeee
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENCODE_API_KEY: ${{ secrets.ZEN_API_KEY }}
with:
model: ${{ vars.OPENCODE_DEFAULT_MODEL }}
use_github_token: false
- name: fallback
if: steps.opencode_primary.outcome == 'failure'
# Pinned to an immutable commit for CodeQL (tag: github-v1.2.17)
uses: anomalyco/opencode/github@2410593023d2c61f05123c9b0faf189a28dfbeee
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENCODE_API_KEY: ${{ secrets.ZEN_API_KEY }}
with:
model: ${{ vars.OPENCODE_DEFAULT_MODEL_FALLBACK }}
use_github_token: false