Skip to content

Commit

Permalink
DEV : Setup slack notification for cron job (#295)
Browse files Browse the repository at this point in the history
modified:   .github/workflows/ets-from-source.yml
  • Loading branch information
Poruri Sai Rahul authored Jul 14, 2021
1 parent 2cd7c9a commit 7262188
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ets-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,31 @@ jobs:
uses: GabrielBB/xvfb-action@v1
with:
run: edm run -- python etstool.py test

notify-on-failure:
needs: test-with-edm
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on failure
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_BOTS_SLACK_CHANNEL_ID }}
status: FAILED
color: danger
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}

notify-on-success:
needs: test-with-edm
if: success()
runs-on: ubuntu-latest
steps:
- name: Notify Slack channel on success
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: ${{ secrets.ETS_BOTS_SLACK_CHANNEL_ID }}
status: SUCCESS
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ACTION_SECRET }}

0 comments on commit 7262188

Please sign in to comment.