Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc20d661

Browse files
committed
fix: use heredoc syntax for multi-line strings in workflow
Fixes YAML validation errors by using proper heredoc syntax (cat <<EOF)instead of raw multi-line strings in bash run blocks.
1 parent26204a6 commitc20d661

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

‎.github/workflows/documentation-check.yaml‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ jobs:
6363
GITHUB_REPOSITORY:${{ github.repository }}
6464
RUN_ID:${{ github.run_id }}
6565
run:|
66-
COMMENT_BODY="🤖 **Documentation Check Started**
66+
COMMENT_BODY=$(cat <<'EOF'
67+
🤖 **Documentation Check Started**
6768
68-
Analyzing PR changes to determine if documentation updates are needed...
69+
Analyzing PR changes to determine if documentation updates are needed...
6970
70-
[View workflow run](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${RUN_ID})
71-
"
71+
[View workflow run](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${RUN_ID})
72+
EOF
73+
)
7274
COMMENT_ID=$(gh pr comment "${PR_NUMBER}" --body "${COMMENT_BODY}" --repo "${GITHUB_REPOSITORY}" | grep -oP 'https://github.com/.*/pull/.*#issuecomment-\K\d+')
7375
echo "comment_id=${COMMENT_ID}" >> "${GITHUB_OUTPUT}"
7476
@@ -219,14 +221,16 @@ EOF
219221
run:|
220222
TASK_OUTPUT=$(cat /tmp/task_output.txt)
221223
222-
COMMENT_BODY="🤖 **Documentation Check Complete**
224+
COMMENT_BODY=$(cat <<EOF
225+
🤖 **Documentation Check Complete**
223226
224-
${TASK_OUTPUT}
227+
${TASK_OUTPUT}
225228
226-
---
227-
Task:https://dev.coder.com/tasks/${TASK_NAME}
228-
[View workflow run](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${RUN_ID})
229-
"
229+
---
230+
Task: https://dev.coder.com/tasks/${TASK_NAME}
231+
[View workflow run](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${RUN_ID})
232+
EOF
233+
)
230234
231235
# Update the existing comment
232236
gh api \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp