From bb0f361ca25d9d3641d36c49f26e440ac2dce983 Mon Sep 17 00:00:00 2001 From: Geoff Lamrock Date: Mon, 12 Aug 2024 12:21:58 +1000 Subject: [PATCH] Add slack notification for scheduled build failure --- .github/workflows/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b275d35..398f2336 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,3 +81,19 @@ jobs: - name: Echo package number from self-test run: echo "Release Created [${{ steps.self_test.outputs.release_number }}]" + + notify: + runs-on: ubuntu-latest + name: Slack - Notify on nightly build failure + needs: [test] + if: ${{ github.event_name == 'schedule' && failure() }} + + steps: + - name: Notify + uses: zuplo/github-action-slack-notify-build@v2 + with: + channel_id: ${{ secrets.SLACK_NOTIFICATIONS_CHANNEL_ID }} + status: FAILED + color: danger + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_TOKEN }}