Skip to content

Commit 6fb94b5

Browse files
committed
Fix GitHub Actions output format for multiline strings - use heredoc syntax
1 parent b862758 commit 6fb94b5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/issue_comp_link-issue-to-pr.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,11 @@ jobs:
177177
# Check if current PR is already in the list
178178
if echo "$pr_list" | grep -q "$pr_url"; then
179179
echo "PR already exists in comment, using existing list"
180-
echo "pr_list=$existing_body" >> "$GITHUB_OUTPUT"
180+
{
181+
echo "pr_list<<EOF"
182+
echo "$existing_body"
183+
echo "EOF"
184+
} >> "$GITHUB_OUTPUT"
181185
else
182186
# Add new PR to the list
183187
new_pr_line="- [${{ inputs.pr_title }}](${{ inputs.pr_url }}) by @${{ inputs.pr_author }}"
@@ -187,7 +191,11 @@ jobs:
187191
188192
updated_list=$(echo -e "$pr_list\n$new_pr_line" | sort -u)
189193
new_body=$(printf "## PRs linked to this issue\n\n%s" "$updated_list")
190-
echo "pr_list=$new_body" >> "$GITHUB_OUTPUT"
194+
{
195+
echo "pr_list<<EOF"
196+
echo "$new_body"
197+
echo "EOF"
198+
} >> "$GITHUB_OUTPUT"
191199
fi
192200
else
193201
# Create new PR list
@@ -197,7 +205,11 @@ jobs:
197205
fi
198206
199207
new_body=$(printf "## PRs linked to this issue\n\n%s" "$new_pr_line")
200-
echo "pr_list=$new_body" >> "$GITHUB_OUTPUT"
208+
{
209+
echo "pr_list<<EOF"
210+
echo "$new_body"
211+
echo "EOF"
212+
} >> "$GITHUB_OUTPUT"
201213
fi
202214
203215
- name: Create new comment

0 commit comments

Comments
 (0)