infra/workflow: Use GitHub Step Summary

Unlike comments, Step Summaries do not require permissions.
This commit is contained in:
Josh Soref 2024-06-28 09:06:10 -04:00 committed by Hermet Park
parent effb58fc63
commit 29325c0ff9
3 changed files with 24 additions and 0 deletions

View file

@ -28,6 +28,14 @@ if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
OUTPUT+="$PAYLOAD_MEMCHECK" OUTPUT+="$PAYLOAD_MEMCHECK"
OUTPUT+=$'\n```\n' OUTPUT+=$'\n```\n'
(
echo '<details><summary>ASAN output</sumary>'
echo
echo "$OUTPUT"
echo
echo '</details>'
) >> "$GITHUB_STEP_SUMMARY"
PAYLOAD=$(echo '{}' | jq --arg body "$OUTPUT" '.body = $body') PAYLOAD=$(echo '{}' | jq --arg body "$OUTPUT" '.body = $body')
curl -s -S -H "Authorization: token $GITHUB_TOKEN" --header "Content-Type: application/vnd.github.VERSION.text+json" --data "$PAYLOAD" "$COMMENTS_URL" curl -s -S -H "Authorization: token $GITHUB_TOKEN" --header "Content-Type: application/vnd.github.VERSION.text+json" --data "$PAYLOAD" "$COMMENTS_URL"

View file

@ -27,6 +27,14 @@ if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
OUTPUT+="$PAYLOAD_MEMCHECK" OUTPUT+="$PAYLOAD_MEMCHECK"
OUTPUT+=$'\n```\n' OUTPUT+=$'\n```\n'
(
echo '<details><summary>Valgrind output</sumary>'
echo
echo "$OUTPUT"
echo
echo '</details>'
) >> "$GITHUB_STEP_SUMMARY"
PAYLOAD=$(echo '{}' | jq --arg body "$OUTPUT" '.body = $body') PAYLOAD=$(echo '{}' | jq --arg body "$OUTPUT" '.body = $body')
curl -s -S -H "Authorization: token $GITHUB_TOKEN" --header "Content-Type: application/vnd.github.VERSION.text+json" --data "$PAYLOAD" "$COMMENTS_URL" curl -s -S -H "Authorization: token $GITHUB_TOKEN" --header "Content-Type: application/vnd.github.VERSION.text+json" --data "$PAYLOAD" "$COMMENTS_URL"

View file

@ -159,6 +159,14 @@ jobs:
export PATH=$PATH:~/.local/bin/ export PATH=$PATH:~/.local/bin/
python3 "${GITHUB_WORKSPACE}/.github/workflows/regression_check.py" python3 "${GITHUB_WORKSPACE}/.github/workflows/regression_check.py"
if [[ -f "fail_ci.txt" ]]; then
(
echo '```'
cat "fail_ci.txt"
echo '```'
) >> "$GITHUB_STEP_SUMMARY"
fi
- name: Find Comment - name: Find Comment
uses: peter-evans/find-comment@v3 uses: peter-evans/find-comment@v3
id: fc id: fc