Skip to content

Commit b5f33a7

Browse files
ci: Add opencode to GitHub (#605)
1 parent ee3540e commit b5f33a7

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/opencode.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: opencode
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
opencode:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '/opencode')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/opencode')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '/opencode')) ||
19+
(github.event_name == 'issues' && contains(github.event.issue.body, '/opencode'))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
id-token: write
23+
contents: read
24+
pull-requests: read
25+
issues: read
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v6
29+
with:
30+
fetch-depth: 1
31+
persist-credentials: false
32+
33+
- name: Run opencode
34+
uses: anomalyco/opencode/github@v1
35+
env:
36+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
37+
with:
38+
model: opencode-go/glm-5

0 commit comments

Comments
 (0)