From 34c62d8ad981ca0a63bfe3b13d925da6e7bad477 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Tue, 15 Nov 2022 14:35:43 +0100 Subject: [PATCH] ci(actions): Adding slack alert Signed-off-by: rjshrjndrn --- .github/workflows/api-ee.yaml | 9 +++++++++ .github/workflows/api.yaml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/api-ee.yaml b/.github/workflows/api-ee.yaml index e5974b302..1642e5c20 100644 --- a/.github/workflows/api-ee.yaml +++ b/.github/workflows/api-ee.yaml @@ -114,6 +114,15 @@ jobs: IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} ENVIRONMENT: staging + - name: Alert slack + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: ee + SLACK_TITLE: "Failed ${{ github.action }}" + SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff' + SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }} + # - name: Debug Job # if: ${{ failure() }} # uses: mxschmitt/action-tmate@v3 diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml index 8c1849970..b0abe1f37 100644 --- a/.github/workflows/api.yaml +++ b/.github/workflows/api.yaml @@ -113,6 +113,15 @@ jobs: IMAGE_TAG: ${{ github.ref_name }}_${{ github.sha }} ENVIRONMENT: staging + - name: Alert slack + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: foss + SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff' + SLACK_TITLE: "Failed ${{ github.action }}" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEB_HOOK }} + # - name: Debug Job # if: ${{ failure() }} # uses: mxschmitt/action-tmate@v3