forked from jnode/jnode
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (71 loc) · 2.48 KB
/
opencode.yml
File metadata and controls
74 lines (71 loc) · 2.48 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
name: opencode
run-name: "Issue #${{ 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: Install QEMU
run: sudo apt-get update -qq && sudo apt-get install -y -qq qemu-system-x86 socat
- name: Prepare jnode.properties
run: cp .github/qemu/jnode.properties .
- 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
id: run_agent
uses: anomalyco/opencode/github@latest
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
model: opencode/nemotron-3-ultra-free
variant: high
- name: Apply agent/* label and close if work-product is the comment
if: success() || failure() || cancelled()
env:
PREV_CONCLUSION: ${{ steps.run_agent.outcome }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
script: |
const postStep = require('./.github/scripts/opencode-post-step.js');
await postStep({ github, context, core });