mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
37 lines
990 B
YAML
37 lines
990 B
YAML
name: Use Claude To Translate
|
|
|
|
on:
|
|
issues:
|
|
types: [opened, edited]
|
|
issue_comment:
|
|
types: [created, edited]
|
|
|
|
jobs:
|
|
claude-response:
|
|
if: |
|
|
(github.event_name == 'issue_comment')||(github.event_name == 'issues')
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
issues: read
|
|
id-token: write
|
|
actions: read # Required for Claude to read CI results on PRs
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Run Claude Code
|
|
id: claude
|
|
uses: anthropics/claude-code-action@v1
|
|
with:
|
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
|
|
# This is an optional setting that allows Claude to read CI results on PRs
|
|
additional_permissions: |
|
|
actions: read
|
|
|
|
prompt: "Replace the issue with its English translation and substitute the original language."
|