Skip to content

fix: 修复 review comment 中的 @ 提及未被正确响应的问题 #15

fix: 修复 review comment 中的 @ 提及未被正确响应的问题

fix: 修复 review comment 中的 @ 提及未被正确响应的问题 #15

name: Update System Prompt
on:
push:
paths:
- 'system_prompt.md'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
env:
GH_TOKEN: ${{ secrets.REPOSITORY_VARIABLE_API_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Update SYSTEM_PROMPT variable
run: |
echo "正在更新 SYSTEM_PROMPT 变量..."
# 检查 system_prompt.md 文件是否存在
if [ ! -f "system_prompt.md" ]; then
echo "错误: system_prompt.md 文件不存在"
exit 1
fi
# 读取 system_prompt.md 内容
SYSTEM_PROMPT_CONTENT=$(cat system_prompt.md)
# 更新 GitHub Actions 变量
gh api --method PATCH \
/repos/${{ github.repository }}/actions/variables/SYSTEM_PROMPT \
-f name=SYSTEM_PROMPT \
-f value="$SYSTEM_PROMPT_CONTENT"
echo "✓ SYSTEM_PROMPT 变量已更新"
echo "文件大小: $(wc -c < system_prompt.md) 字符"