Skip to content

Commit

Permalink
feat: add slack notifications on failed workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbaliasnikov committed Dec 2, 2024
1 parent 90822ed commit c6ea6a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release-plz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
cargo_registry_token:
description: 'Cargo registry token'
required: true
slack_webhook:
description: 'Slack webhook for notifications'
required: true
inputs:
run_tests:
type: boolean
Expand Down Expand Up @@ -60,6 +63,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.gh_token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.cargo_registry_token }}

- name: Notify about failure
if: failure()
uses: matter-labs/format-release-please-for-slack-action@69e6fe9e4ec531b7b5fb0d826f73c190db83cf42 # v2.1.0
with:
release-please-output: '{ "body": "⚠️ Failed to publish the release" }'
slack-webhook-url: ${{ secrets.slack_webhook }}

# Create a PR with the new versions and changelog, preparing the next release.
release-plz-pr:
name: Release-plz PR
Expand Down

0 comments on commit c6ea6a3

Please sign in to comment.