From ae10d075b8b87d1fac60b2c53e17e8398a91f680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Arjovsky?= Date: Mon, 25 Nov 2024 22:03:24 +0100 Subject: [PATCH] fix(l1): fix hive report workflow (#1262) **Motivation** The step that builds the report and saves it to an output so the report is not being published. --- .github/workflows/hive_coverage.yaml | 22 +++++----------------- publish.sh | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 publish.sh diff --git a/.github/workflows/hive_coverage.yaml b/.github/workflows/hive_coverage.yaml index 8268c9c7fe..6f9f856f48 100644 --- a/.github/workflows/hive_coverage.yaml +++ b/.github/workflows/hive_coverage.yaml @@ -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/slack-github-action@v2.0.0 - 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 diff --git a/publish.sh b/publish.sh new file mode 100644 index 0000000000..37d7bc37fd --- /dev/null +++ b/publish.sh @@ -0,0 +1,22 @@ +curl -X POST $url \ +-H 'Content-Type: application/json; charset=utf-8' \ +--data @- <