Skip to content

Commit

Permalink
fix(l1): fix hive report workflow (#1262)
Browse files Browse the repository at this point in the history
**Motivation**

The step that builds the report and saves it to an output so the report
is not being published.
  • Loading branch information
Arkenan authored Nov 25, 2024
1 parent 2330a51 commit ae10d07
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/hive_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,13 @@ jobs:
id: report
run: |
cargo run -p hive_report > results.md
echo "content=$(cat results.md)" >> $GITHUB_OUTPUT
- name: Post results in summary
run: |
echo "# Hive coverage report\n\n" >> $GITHUB_STEP_SUMMARY
$(cat results.md) >> $GITHUB_STEP_SUMMARY
echo "# Hive coverage report" >> $GITHUB_STEP_SUMMARY
cat results.md >> $GITHUB_STEP_SUMMARY
- name: Post results to slack
uses: slackapi/[email protected]
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
blocks:
- type: "header"
text:
type: "plain_text"
text: Hive coverage report
- type: "section"
text:
type: "mrkdwn"
text: ${{steps.report.outputs.content}}
env:
url: ${{ secrets.SLACK_WEBHOOK_URL }}
run: sh publish.sh
22 changes: 22 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
curl -X POST $url \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$(cat results.md)" '{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Daily report"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": $text
}
}
]
}')
EOF

0 comments on commit ae10d07

Please sign in to comment.