fix: indent heredoc content to satisfy YAML block scalar parser

YAML ends a block scalar when it sees content less indented than
the first content line. The JSON heredoc at column 0 caused the
parser to bail out mid-block. Indenting to 8 spaces keeps it inside
the run: | scalar; YAML strips that indentation before handing the
script to the shell, so the NOMAD_EOF terminator lands at column 0
as required.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Christopher Mühl 2026-02-17 11:06:04 +01:00
parent 22ad13e061
commit 76c0b483c8
No known key found for this signature in database
GPG key ID: 925AC7D69955293F

View file

@ -79,7 +79,7 @@ runs:
shell: bash shell: bash
run: | run: |
cat > /tmp/deploy-${{ inputs.site-name }}.nomad.json <<'NOMAD_EOF' cat > /tmp/deploy-${{ inputs.site-name }}.nomad.json <<'NOMAD_EOF'
{ {
"Job": { "Job": {
"ID": "${{ inputs.site-name }}", "ID": "${{ inputs.site-name }}",
"Name": "${{ inputs.site-name }}", "Name": "${{ inputs.site-name }}",
@ -172,8 +172,8 @@ runs:
] ]
}] }]
} }
} }
NOMAD_EOF NOMAD_EOF
nomad job run -json /tmp/deploy-${{ inputs.site-name }}.nomad.json nomad job run -json /tmp/deploy-${{ inputs.site-name }}.nomad.json