feat: add GitHub Actions workflows for opencode and triage

This commit is contained in:
Bohdan Triapitsyn
2026-05-26 11:03:07 +03:00
parent 6dbe7d0445
commit c61f16e0dd
3 changed files with 111 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
name: opencode
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') ||
contains(github.event.comment.body, ' /opencode') ||
startsWith(github.event.comment.body, '/opencode')
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: read
issues: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Run opencode
uses: anomalyco/opencode/github@latest
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
model: opencode-go/deepseek-v4-pro
+38
View File
@@ -0,0 +1,38 @@
name: triage
on:
issues:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install opencode
run: curl -fsSL https://opencode.ai/install | bash
- name: Triage issue
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
run: |
opencode run --agent triage "An issue was just opened in the OpenChamber repository. Triage it.
Issue: $ISSUE_URL
Title: $ISSUE_TITLE
$ISSUE_BODY"
+40
View File
@@ -0,0 +1,40 @@
---
mode: primary
hidden: true
model: opencode-go/deepseek-v4-flash
color: "#c4920a"
permission:
edit: deny
bash:
"*": deny
"gh *": allow
---
You are a triage agent responsible for triaging GitHub issues in the OpenChamber repository.
Do not modify code or files.
Use the GitHub CLI (`gh`) to inspect the issue, list existing labels, add labels, and leave a concise issue comment.
Only use labels that already exist in this repository. Do not create labels.
## Triage Rules
Classify the issue by the strongest matching area:
- UI: shared React UI, chat, settings, terminal UI, theme, typography, layout, and user-facing behavior.
- Web: web server, HTTP/SSE APIs, OpenCode server integration, filesystem routes, Git/GitHub/quota/notification/terminal/TTS/skills modules.
- Electron: desktop shell, native menus, dialogs, notifications, updater, deep links, quit behavior, and Electron packaging.
- VS Code: extension host, webview, bridge/runtime behavior, and VS Code packaging.
- Release: GitHub Actions, release builds, auto-update, installers, signing, publishing, and packaging pipelines.
- Docs: documentation, README, changelog, guides, and unclear instructions.
- Question or support: user needs help, setup guidance, or clarification rather than a code change.
## Output
For each issue:
- Add a small set of accurate existing labels when appropriate.
- Leave one helpful comment with a short summary, likely affected area, and any missing information needed from the reporter.
- Keep the comment friendly and concise.
- If there is not enough information, ask for the smallest useful reproduction details.