From 1767cfbf758eb2178341d1e5ad1c7403ebf5d7a8 Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi <113376043+delucchi-cmu@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:15:44 -0500 Subject: [PATCH] Add slack reporting --- .github/workflows/smoke-test.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index cb1073f..a2777d1 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -44,3 +44,41 @@ jobs: env: ABFS_LINCCDATA_ACCOUNT_NAME: ${{ secrets.LINCC_ABFS_ACCOUNT_NAME }} ABFS_LINCCDATA_ACCOUNT_KEY: ${{ secrets.LINCC_ABFS_ACCOUNT_KEY }} + - name: Send status to Slack app (LSDB CI Reporter) + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} + id: slack + uses: slackapi/slack-github-action@v1.24.0 + with: + # For posting a rich message using Block Kit + payload: | + { + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "${{ github.repository }}" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "GitHub Action build result: *${{ job.status }}* :${{ job.status }}:" + } + }, + { + "type": "divider" + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + } + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK \ No newline at end of file