-
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.23 KB
/
Copy pathopencode.yml
File metadata and controls
38 lines (36 loc) · 1.23 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
name: opencode
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
jobs:
opencode:
if: |
(github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'COLLABORATOR') &&
(contains(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, '/opencode'))
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
pull-requests: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
persist-credentials: false
- name: Run OpenCode
# Pin the reviewed dev branch commit before exposing credentials.
# Use the OpenCode-provided key, not a third-party Anthropic secret.
uses: anomalyco/opencode/github@4a760b5743496942fd821eeafaa7d648a5630973
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
model: anthropic/claude-sonnet-4-5
agent: github-scan
use_github_token: true