Skip to content

Commit

Permalink
build: test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gbotrel committed Sep 14, 2024
1 parent 67d2edf commit 0c6515e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/slack-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ jobs:
]
}')
else
payload=$(jq -n --arg repository "${{ inputs.repository }}" --arg branch "${{ inputs.branch }}" --arg actor "${{ inputs.actor }}" --arg run_id "${{ inputs.run_id }}" --arg failures "${{ inputs.failures }}" '{
# Escape the failures input for JSON and Slack
escaped_failures=$(echo "${{ inputs.failures }}" | jq -sRr @json | sed 's/\\n/\\n/g')
payload=$(jq -n --arg repository "${{ inputs.repository }}" --arg branch "${{ inputs.branch }}" --arg actor "${{ inputs.actor }}" --arg run_id "${{ inputs.run_id }}" --arg failures "$escaped_failures" '{
"channel": "team-gnark-build",
"text": "GitHub Action build result: failure",
"blocks": [
Expand All @@ -78,14 +80,14 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Failed Step:* <https://github.com/\($repository)/actions/runs/\($run_id)|View Details>"
"text": "<https://github.com/\($repository)/actions/runs/\($run_id)|View Details>"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Test Failure Details:* \($failures)"
"text": "*Failed tests:*\n\n\($failures)"
}
},
{
Expand Down

0 comments on commit 0c6515e

Please sign in to comment.