chore: fix issue with multiline strings in output

Looking at [1] this should do some magic, so let's see.

[1] https://github.community/t/set-output-truncates-multiline-strings/16852
This commit is contained in:
Harm Weites 2022-03-31 12:45:58 +02:00
parent 5fc1b0e2fb
commit 1dd44fc493
No known key found for this signature in database
GPG key ID: 512F961398DC5619

View file

@ -43,7 +43,7 @@ if [ -n "$HADOLINT_OUTPUT" ]; then
echo "$RESULTS" > $HADOLINT_OUTPUT echo "$RESULTS" > $HADOLINT_OUTPUT
fi fi
RESULTS="${RESULTS//\`/\\\`}" RESULTS="${RESULTS//$'\\n'/''}"
echo "::set-output name=results::$RESULTS" echo "::set-output name=results::$RESULTS"
[ -z "$HADOLINT_OUTPUT" ] || echo "Hadolint output saved to: $HADOLINT_OUTPUT" [ -z "$HADOLINT_OUTPUT" ] || echo "Hadolint output saved to: $HADOLINT_OUTPUT"