Skip to content

Commit 5a0bc54

Browse files
committed
Fix debug_log bash function to support multi-line logging
1 parent d73477e commit 5a0bc54

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/actions/build-tar-image/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ runs:
162162
163163
debug_log() {
164164
if [ "${RUNNER_DEBUG:-0}" = "1" ]; then
165-
echo "##[debug]$1"
165+
echo "$1" | while IFS= read -r line; do
166+
echo "##[debug]$line"
167+
done
166168
fi
167169
}
168170

.github/actions/load-tar-image/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ runs:
2323
- name: Set outputs
2424
run: |
2525
set -euo pipefail
26-
26+
2727
debug_log() {
2828
if [ "${RUNNER_DEBUG:-0}" = "1" ]; then
29-
echo "##[debug]$1"
29+
echo "$1" | while IFS= read -r line; do
30+
echo "##[debug]$line"
31+
done
3032
fi
3133
}
3234

0 commit comments

Comments
 (0)