Skip to content

Commit

Permalink
Setup notification process for slack
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinika authored and bilalesi committed Nov 7, 2023
1 parent 8b7a460 commit f98a9b6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/monitor-studios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,26 @@ jobs:
run: |
yarn cy:publicstudios
- name: Send error notification
id: slack
if: ${{ failure() && steps.e2eTests.conclusion == 'failure' }}
run: echo "We should send a slack notification in this case"
uses: slackapi/[email protected]
with:
channel-id: 'team-nise-alerts'
payload: |
{
"text": "Failure in the public studios e2e cron job",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build ID: ${{ github.run_id }}\n URL: https://github.com/BlueBrain/nexus-web/actions/runs/${{ github.run_id }}\n ${{steps.e2eTests.outputs}}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Cleanup Docker Containers
if: ${{ always() }}
run: docker-compose -f ci/docker-compose.yml down --rmi "local" --volumes

0 comments on commit f98a9b6

Please sign in to comment.