-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mimir-rules-action] fix multiline output expression #9051
[mimir-rules-action] fix multiline output expression #9051
Conversation
Signed-off-by: rasta-rocket <[email protected]>
8e16c06
to
3ceb051
Compare
I'm trying my luck with you to get a review on this 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Sorry for such a long delay for the review.
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that there can't be any collision between "$OUTPUT" and "EOF", as "$OUTPUT" would need to be exactly "EOF" and I can't see that being an option for the $OUTPUT.
I'm trying to merge this but for some reason the CI won't run, can I ask you to rebase this on latest main and force-push? (Edit: figured out, I didn't see the CI approval button because I was trying "the new merge experience" feature in Github) |
@colega sorry for the late answer and thanks a lot for the review 🚀 Any chance you can do a review on a similar PR: grafana/cortex-rules-action#27 ? |
Reviewed, thanks! |
Signed-off-by: rasta-rocket [email protected]
What this PR does
Hey folks 👋
Small PR that fix/simplify the way the multiline is rendered in the output of the action mimir-rules-action
With the following pipeline:
This has been done following : https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string
Don't hesitate to ping me if any remarks/questions 😉 ?
Cheers ☀️
Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.