forked from jnode/jnode
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (60 loc) · 2 KB
/
opencode.yml
File metadata and controls
63 lines (60 loc) · 2 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
name: opencode
run-name: "Review #${{ github.event.issue.number }}: ${{ github.event.issue.title }}"
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
jobs:
opencode:
if: |
(contains(github.event.comment.body, ' /oc ') ||
startsWith(github.event.comment.body, '/oc ')) &&
(github.event.comment.author_association == 'COLLABORATOR' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'OWNER')
runs-on: ubuntu-latest
timeout-minutes: 30
env:
# This forces actions to use Node 24 and clears the warning
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Clone wiki
run: gh repo clone LSantha/jnode_ai.wiki .wiki
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
- name: Cache ISO build
id: cache-iso
uses: actions/cache@v4
with:
path: all/build/cdroms/jnode-x86-lite.iso
key: jnode-iso-${{ hashFiles('**/*.java', '**/build.xml', 'build.sh') }}
- name: Build ISO
if: steps.cache-iso.outputs.cache-hit != 'true'
run: sh build.sh cd-x86-lite
- name: Run opencode
uses: anomalyco/opencode/github@latest
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
model: opencode/qwen3.6-plus-free
- name: Close issue
if: success() && contains(github.event.issue.title, 'Review ')
run: gh issue close ${{ github.event.issue.number }} -R ${{ github.repository }}
env:
GH_TOKEN: ${{ secrets.GH_PAT }}