fix(ci): 修复 deploy.yml YAML 解析错误
Deploy / deploy (push) Has been cancelled

多行 bash 字符串的续行未缩进到 run: | 块内,YAML 解析器
将 '- **版本**' 误判为列表项。改用 printf 单行拼接 BODY。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-05-24 10:54:35 +08:00
parent 9f94cc97b7
commit 32ea281dfa
+2 -7
View File
@@ -40,13 +40,8 @@ jobs:
COMMIT="${{ gitea.sha }}"
COMMIT_MSG=$(git log -1 --pretty="%s" HEAD)
RECENT_LOGS=$(git log -5 --pretty="- %s (%h)" HEAD)
BODY="## 构建信息
- **版本**: ${VERSION}
- **Commit**: ${COMMIT}
- **时间**: $(date '+%Y-%m-%d %H:%M:%S %Z')
## 最近提交
${RECENT_LOGS}"
BODY=$(printf '## 构建信息\n- **版本**: %s\n- **Commit**: %s\n- **时间**: %s\n\n## 最近提交\n%s' \
"${VERSION}" "${COMMIT}" "$(date '+%Y-%m-%d %H:%M:%S %Z')" "${RECENT_LOGS}")
RESP=$(curl -s -X POST "${FORGEJO_URL}/api/v1/repos/${{ gitea.repository }}/releases" \
-H "Authorization: token ${FORGEJO_TOKEN}" \