Kaynağa Gözat

use %0A in github workflow because \n is truncated

narodnik 5 yıl önce
ebeveyn
işleme
95c8abfc64
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      .github/workflows/matrix-commit-message.yml

+ 3 - 1
.github/workflows/matrix-commit-message.yml

@@ -13,7 +13,9 @@ jobs:
           ALL_MSGS=""
           for i in ${{ join(github.event.commits.*.id, ' ') }}; do
             MSG=$(git --no-pager show -s --format='%h <b>%an</b>: %s' $i)
-            ALL_MSGS="$ALL_MSGS$MSG"$'\n'
+            # From this link the newline character is: %0A
+            # https://github.community/t/set-output-truncates-multiline-strings/16852
+            ALL_MSGS="$ALL_MSGS$MSG%0A"
           done
           echo "::set-output name=COMMIT_MESSAGE::$ALL_MSGS"
         id: commit-message