Skip to content

Commit 6498604

Browse files
committed
Use multiline GITHUB_OUTPUT for changed files
Replace the single-line echo that wrote CHANGED_FILES to $GITHUB_OUTPUT with a here-document (key<<EOF ... EOF) to correctly export multi-line file lists. This preserves newlines and spaces in the changed-files output so downstream workflow steps receive the full list.
1 parent f95a9e9 commit 6498604

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/format.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ jobs:
2323
run: |
2424
git fetch origin ${{ github.base_ref }}
2525
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
26-
echo "changed=$CHANGED_FILES" >> $GITHUB_OUTPUT
26+
27+
{
28+
echo "changed<<EOF"
29+
echo "$CHANGED_FILES"
30+
echo "EOF"
31+
} >> "$GITHUB_OUTPUT"
2732
2833
- name: Show changed files
2934
run: |

0 commit comments

Comments
 (0)