From 7bc5f3345fd6d7da6069d8d56ef2686295c45565 Mon Sep 17 00:00:00 2001 From: Sayali Mohadikar <76010603+sayaliM0412@users.noreply.github.com> Date: Tue, 21 May 2024 08:35:21 -0500 Subject: [PATCH] DAT-17536 (#209) * slack notification * slack notification * slack notification * slack notification --------- Co-authored-by: Sayali M --- .github/workflows/slack-notification.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/slack-notification.yml diff --git a/.github/workflows/slack-notification.yml b/.github/workflows/slack-notification.yml new file mode 100644 index 00000000..ef97afba --- /dev/null +++ b/.github/workflows/slack-notification.yml @@ -0,0 +1,21 @@ +name: Slack Notification + +on: + repository_dispatch: + types: [ test-failure ] + +jobs: + slack-notification: + runs-on: ubuntu-latest + steps: + - name: Notify Slack on Build Failure + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: ${{ job.status }} + SLACK_MESSAGE: "View details on GitHub Actions: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} <@U042HRTL4DT>" + SLACK_TITLE: "❌ ${{ github.repository }} ❌ Tests failed on branch ${{ github.ref }} for commit ${{ github.sha }} in repository ${{github.repository}}" + SLACK_USERNAME: liquibot + SLACK_WEBHOOK: ${{ secrets.NIGHTLY_BUILDS_SLACK_WEBHOOK }} + SLACK_ICON_EMOJI: ":robot_face:" + SLACK_FOOTER: "${{ github.repository }}" + SLACK_LINK_NAMES: true \ No newline at end of file