- 根因:build-image job 注入 Docker daemon.json 时用了 bash heredoc <<'PY'...PY;heredoc 内部 Python 代码在 YAML 文件里缩进为 0,触发 run:| 字面块标量提前结束;Gitea YAML 解析器尝试把下一行解析为新的 key 却找不到冒号 → 抛 line 177 could not find expected ':',整个 workflow 无法触发 - 修复:移除 heredoc 结构,改为 PY_CODE 单引号字符串 + printf '%s' | python3 - stdin 管道传递;单引号内所有 Python 行统一保持与外层 shell 语句一致的 12 spaces 前导缩进(满足 YAML 块标量 ≥ 10 spaces 基础缩进要求);Python 顶级代码统一缩进 12 spaces,块内再缩进 4 spaces,避免 IndentationError - 验证:IDE YAML 诊断 0 错误;Gitea Actions 页左侧 deploy.yml 红色感叹号应立即消失,可正常触发 run