diff --git a/.github/workflows/translate-issues.yml b/.github/workflows/translate-issues.yml new file mode 100644 index 0000000000..8c55f5df40 --- /dev/null +++ b/.github/workflows/translate-issues.yml @@ -0,0 +1,22 @@ +name: Auto Translate Issues & PRs + +on: + issues: + types: [opened, edited] # 当 Issue 被创建或编辑时触发 + pull_request: + types: [opened, edited] # 当 Pull Request 被创建或编辑时触发 + +jobs: + translate: + runs-on: ubuntu-latest + + permissions: + issues: write # 允许 Action 在 Issues 上发表评论和添加标签 + pull-requests: write # 允许 Action 在 Pull Requests 上发表评论和添加标签 + + steps: + - name: Auto Translate + uses: dromara/issues-translate-action@v1.2.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + label-name: 'auto-translated'