Skip to content

Commit

Permalink
Implement slack notification
Browse files Browse the repository at this point in the history
  • Loading branch information
klnsz committed May 22, 2024
1 parent 8077299 commit 70ce1db
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=histify.azurecr.io/cypress:cache
cache-to: type=registry,ref=histify.azurecr.io/cypress:cache

slack:
needs: [build]
if: "failure('build') && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))"
runs-on: self-hosted
steps:
- name: slack
uses: slackapi/[email protected]
with:
payload: '{"text": ":boom: ${{ github.repository }} <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|*build pipeline failed*> on `${{ github.ref_name }}`, by ${{ github.event.pusher.name }}; please fix :thanks:"}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit 70ce1db

Please sign in to comment.