Skip to content

Commit

Permalink
mimir-rules-action: set-output is deprecated (#4372)
Browse files Browse the repository at this point in the history
* `mimir-rules-action`: `set-output` is deprecated

See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

`set-output` will stop working on June 1st and is currently warning

* Update entrypoint.sh

* Correctly output multiline

Summary should use the multiline format: github/docs#21529

* Use `ENDOFSUMMARY` instead of EOF
  • Loading branch information
julienduchesne authored Mar 7, 2023
1 parent 91c434f commit acc4be5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions operations/mimir-rules-action/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ case "${ACTION}" in
esac

SINGLE_LINE_OUTPUT=$(echo "${OUTPUT}" | awk 'BEGIN { RS="%0A" } { gsub(/%/, "%25"); gsub(/\r/, "%0D"); gsub(/\n/, "%0A") } { print }')
echo ::set-output name=detailed::"${SINGLE_LINE_OUTPUT}"
echo "detailed=${SINGLE_LINE_OUTPUT}" >> $GITHUB_OUTPUT
SUMMARY=$(echo "${OUTPUT}" | grep Summary)
echo ::set-output name=summary::"${SUMMARY}"
echo 'summary<<ENDOFSUMMARY' >> $GITHUB_OUTPUT
echo "${SUMMARY}" >> $GITHUB_OUTPUT
echo 'ENDOFSUMMARY' >> $GITHUB_OUTPUT

exit $STATUS

0 comments on commit acc4be5

Please sign in to comment.