mirror of
https://github.com/Lydanne/spaceflow.git
synced 2026-03-11 11:42:44 +08:00
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
name: PR Review
|
||
|
||
on:
|
||
pull_request:
|
||
types: [opened, synchronize, reopened, closed]
|
||
|
||
permissions:
|
||
contents: read # 仓库内容:只读
|
||
pull-requests: write # PR:可写(比如评论PR)
|
||
issues: write # Issues:可写
|
||
deployments: read # 部署:只读
|
||
id-token: write # ID Token:可写
|
||
pages: write # Pages:可写
|
||
packages: write # Packages:可写
|
||
repository-projects: write # Repository Projects:可写
|
||
security-events: write # Security Events:可写
|
||
workflows: write # Workflows:可写
|
||
|
||
jobs:
|
||
pr-review:
|
||
runs-on: ubuntu-node-24
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v4
|
||
|
||
- name: Setup pnpm
|
||
uses: pnpm/action-setup@v4
|
||
with:
|
||
version: 10
|
||
|
||
- name: Set pnpm registry to npmmirror
|
||
run: |
|
||
pnpm config set registry https://registry.npmmirror.com
|
||
pnpm install -g @anthropic-ai/claude-code
|
||
pnpm install -g opencode-ai
|
||
|
||
- name: Run Review
|
||
uses: ./actions
|
||
env:
|
||
GIT_PROVIDER_TYPE: gitea
|
||
CLAUDE_CODE_BASE_URL: https://ark.cn-beijing.volces.com/api/coding
|
||
CLAUDE_CODE_AUTH_TOKEN: ${{ secrets.CLAUDE_CODE_AUTH_TOKEN }}
|
||
OPENAI_BASE_URL: https://ark.cn-beijing.volces.com/api/v3
|
||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||
OPENAI_MODEL: deepseek-v3-2-251201
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
with:
|
||
command: review
|
||
args: -vv -l openai
|
||
event-action: ${{ github.event.action }}
|
||
dev-mode: "true"
|