fix: 修复 workflow YAML 语法错误,移除 heredoc 格式

- 修复 docker-build.yml 和 telegram-notify.yml 中的 heredoc 格式问题
- 使用 $'\n' 格式构建多行字符串,避免 YAML 解析器误判
- 确保所有 workflow 文件符合 GitHub Actions YAML 语法规范
This commit is contained in:
WrBug
2026-01-02 04:58:14 +08:00
parent 60e9f9235d
commit c8e422a94b
2 changed files with 2 additions and 17 deletions
+1 -9
View File
@@ -85,15 +85,7 @@ jobs:
REPO_NAME="${{ github.repository }}"
# 构建消息内容(使用 HTML 格式)
MESSAGE=$(cat <<EOF
✅ <b>Docker 镜像构建成功</b>
📦 <b>版本:</b> ${VERSION}
🏷️ <b>Tag:</b> <code>${TAG}</code>
🔗 <b>Release:</b> <a href="${RELEASE_URL}">查看 Release</a>
🐳 <b>Docker 镜像:</b> <code>wrbug/polyhermes:${TAG}</code>
EOF
)
MESSAGE="✅ <b>Docker 镜像构建成功</b>"$'\n'$'\n'"📦 <b>版本:</b> ${VERSION}"$'\n'"🏷️ <b>Tag:</b> <code>${TAG}</code>"$'\n'"🔗 <b>Release:</b> <a href=\"${RELEASE_URL}\">查看 Release</a>"$'\n'"🐳 <b>Docker 镜像:</b> <code>wrbug/polyhermes:${TAG}</code>"
# 添加 Release 名称(如果有)
if [ -n "$RELEASE_NAME" ] && [ "$RELEASE_NAME" != "null" ] && [ "$RELEASE_NAME" != "" ]; then