From e8fc19bd549fff0de3dd98236cf286112aa41740 Mon Sep 17 00:00:00 2001 From: LittleYellow Date: Sat, 25 Jul 2026 13:48:17 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=96=B0=E5=A2=9E=20Gitea=20Actions=20wo?= =?UTF-8?q?rkflow=20=E8=AE=93=20Claude=20=E5=9B=9E=E6=87=89=20issue/PR=20?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 以 markwylde/claude-code-gitea-action 掛在 issue_comment、 pull_request_review_comment、issues、pull_request_review 事件上。 GITEA_SERVER_URL 覆寫為外部網址,避免容器內部 http://gitea:3000 連結外部無法存取。 Co-Authored-By: Claude Opus 5 --- .gitea/workflows/claude.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/claude.yml diff --git a/.gitea/workflows/claude.yml b/.gitea/workflows/claude.yml new file mode 100644 index 0000000..389a2c9 --- /dev/null +++ b/.gitea/workflows/claude.yml @@ -0,0 +1,26 @@ +name: Claude Assistant +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned, labeled] + pull_request_review: + types: [submitted] + +jobs: + claude-response: + runs-on: yellow-zeabur-runner + steps: + - uses: actions/checkout@v4 + - uses: markwylde/claude-code-gitea-action@v1.0.20 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + gitea_token: ${{ secrets.USER_TOKEN }} + claude_git_name: Claude + claude_git_email: claude@anthropic.com + env: + # 如果 Gitea 跑在容器裡,內部連結會變成 http://gitea:3000, + # 用這個覆寫成外部可存取的網址 + GITEA_SERVER_URL: https://yellow-git.zeabur.app \ No newline at end of file