Skip to content

fix: avoid heredoc in sync-template.yml to prevent YAML parse error#18

Merged
h13 merged 1 commit intomainfrom
fix/sync-template-yaml-parse
Mar 27, 2026
Merged

fix: avoid heredoc in sync-template.yml to prevent YAML parse error#18
h13 merged 1 commit intomainfrom
fix/sync-template-yaml-parse

Conversation

@h13
Copy link
Copy Markdown
Owner

@h13 h13 commented Mar 27, 2026

Summary

  • GitLab YAML パーサーが heredoc の EOF を YAML キーと誤認し、sync-template.yml のパースに失敗していた
  • heredoc を echo | sed | grep のパイプに置き換え

Root Cause

GitLab CI の block scalar (- |) 内で bash の heredoc (<<EOF ... EOF) を使うと、行頭の EOF が YAML の simple key として解釈されてパースエラーになる。

Test plan

  • GitLab Template Project で template_sync をトリガーし、MR パイプラインが YAML エラーなく実行されることを確認

…error

GitLab's YAML parser interprets unindented EOF as a YAML key,
causing pipeline parse failure. Replace heredoc with piped sed/grep.
@h13 h13 merged commit 2e1704f into main Mar 27, 2026
4 checks passed
@h13 h13 deleted the fix/sync-template-yaml-parse branch March 27, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant