mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-08-12 08:50:38 +00:00
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: opencode
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
pull_request_review_comment:
|
|
types: [created]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
issues:
|
|
types: [opened]
|
|
|
|
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 }} |