Skip to content
修昊 edited this page Apr 23, 2026 · 2 revisions

Welcome to the opencode-actions wiki!

Enable fast opencode action

name: OpenCode

on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]

jobs:
  opencode:
    name: OpenCode Agent
    if: |
      contains(github.event.comment.body, '/oc') ||
      contains(github.event.comment.body, '/opencode')
    runs-on: self-hosted
    permissions:
      id-token: write
      contents: write
      pull-requests: write
      issues: write
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: true
          token: ${{ secrets.GITHUB_TOKEN }}

      - uses: svtter/opencode-actions/github-run-opencode@v1
        with:
          model: zhipuai-coding-plan/glm-5
          use-github-token: "true"
          github-token: ${{ secrets.GITHUB_TOKEN }}
          zhipu-api-key: ${{ secrets.ZHIPU_API_KEY }}

Comment your issue with /oc will invoke opencode.

Clone this wiki locally