name: opencode on: issue_comment: types: [created] pull_request_review_comment: types: [created] permissions: contents: write issues: write pull-requests: write jobs: bot: 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: contents: read steps: - name: Generate bot token id: token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} owner: ${{ github.repository_owner }} - name: Checkout uses: actions/checkout@v6 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Configure git identity run: | git config --global user.name "takanashi-hoshino-agent[bot]" git config --global user.email "takanashi-hoshino-agent[bot]@users.noreply.github.com" - name: Run opencode uses: anomalyco/opencode/github@latest env: OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} GITHUB_TOKEN: ${{ steps.token.outputs.token }} with: model: opencode/deepseek-v4-flash-free use_github_token: true prompt: | ${{ secrets.OPENCODE_PROMPT }}