Skip to content

Commit

Permalink
[mimir-rules-action] fix multiline output expression (#9051)
Browse files Browse the repository at this point in the history
Signed-off-by: rasta-rocket <[email protected]>
  • Loading branch information
rasta-rocket authored Dec 19, 2024
1 parent 569c22d commit 7fa48db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions operations/mimir-rules-action/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ case "${ACTION}" in
;;
esac

SINGLE_LINE_OUTPUT=$(echo "${OUTPUT}" | awk 'BEGIN { RS="%0A" } { gsub(/%/, "%25"); gsub(/\r/, "%0D"); gsub(/\n/, "%0A") } { print }')
echo "detailed=${SINGLE_LINE_OUTPUT}" >> "${GITHUB_OUTPUT}"
{ echo "detailed<<EOF"; echo "$OUTPUT"; echo "EOF"; } >> "$GITHUB_OUTPUT"
SUMMARY=$(echo "${OUTPUT}" | grep Summary)
# shellcheck disable=SC2129
echo 'summary<<ENDOFSUMMARY' >> "${GITHUB_OUTPUT}"
Expand Down

0 comments on commit 7fa48db

Please sign in to comment.