mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
Merge pull request #144 from bitnami/feature/CONTENT-3783
[bitnami/*] ci: Configure Slack alerts for CI failures in bitnami/minideb
This commit is contained in:
@@ -82,3 +82,40 @@ jobs:
|
||||
- name: Push Manifests
|
||||
run: |
|
||||
DISTS="buster bullseye latest" bash pushmanifest
|
||||
|
||||
# If the CI Pipeline does not succeed we should notify the interested agents
|
||||
slack-notif:
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- build_multiarch
|
||||
- deploy_manifests
|
||||
if: always()
|
||||
name: Notify unsuccessful CI run
|
||||
steps:
|
||||
- name: Notify in Slack channel
|
||||
if: ${{ needs.build_multiarch.result == 'failure' || needs.deploy_manifests.result == 'failure' }}
|
||||
uses: slackapi/slack-github-action@v1.23.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
"text": "*Unsuccessful `bitnami/minideb` CI pipeline*",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "*Unsuccessful `bitnami/minideb` CI pipeline*"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "The CI pipeline for `bitnami/minideb` did not succeed. Check the related <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|action run> for more information."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.CI_SLACK_WEBHOOK_URL }}
|
||||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||
|
||||
Reference in New Issue
Block a user