移除 job 層 RUNNER_TEMP=/tmp,改在 checkout 後把 /tmp/claude-prompts 連到 $RUNNER_TEMP/claude-prompts,讓寫入端與讀取端指向同一實體目錄, 並印出 RUNNER_TEMP 實際值輔助診斷。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
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
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
- name: 對齊 prompt 檔案路徑
|
||
run: |
|
||
echo "RUNNER_TEMP 實際值:[$RUNNER_TEMP]"
|
||
echo "目前工作目錄:$(pwd)"
|
||
# 讓寫入端($RUNNER_TEMP/claude-prompts)與讀取端(/tmp/claude-prompts)指向同一個實體目錄
|
||
mkdir -p "${RUNNER_TEMP}/claude-prompts"
|
||
rm -rf /tmp/claude-prompts
|
||
ln -s "${RUNNER_TEMP}/claude-prompts" /tmp/claude-prompts
|
||
ls -la /tmp/claude-prompts
|
||
|
||
- 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
|
||
path_to_claude_code_executable: /usr/local/bin/claude
|
||
claude_args: |
|
||
--model claude-sonnet-5
|
||
--append-system-prompt "請一律使用繁體中文回覆,包含 issue/PR 留言、commit message 說明文字、todo list 項目。程式碼註解與變數命名維持英文慣例即可。"
|
||
env:
|
||
GITEA_SERVER_URL: https://yellow-git.zeabur.app |