Skip to content

WF run ~ Send notification to slack for failed post-merge workflows #1036

WF run ~ Send notification to slack for failed post-merge workflows

WF run ~ Send notification to slack for failed post-merge workflows #1036

# (C) 2024 GoodData Corporation
name: WF run ~ Send notification to slack for failed post-merge workflows
on:
workflow_run:
workflows: ["Push ~ Build web component's container image"]
types: [completed]
branches: ["master", "release", "hotfix/tiger", "hotfix/panther", "fast_track"]
jobs:
notify-post-merge-failed-to-slack:
runs-on: [infra1-small]
steps:
- name: Inform to slack when post-merge workflows failed
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
uses: slackapi/[email protected]
with:
channel-id: '#javascript-notifications'
slack-message: ":robot_panic: `post-merge github workflows` in `${{ github.event.repository.name }}` encountered an error during execution, check the *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}|log here>* for further information"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}