mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 01:45:44 +03:00
github: notify Slack when CI fails on merge to main/release (#24690)
This change creates a reusable workflow for notifying Slack on CI failures. The message will include useful links and information about the failure, so product engineers can investigate and fix any problems. The new workflow is used by selected workflows which trigger on merges to main or release/* branches. The notification is only sent on failure and when the event was a push (PR merge) meaning the number of notifications should be minimal. The aim is to help identify and draw attention to failure across our release branches, in particular when automated processes happen.
This commit is contained in:
13
.github/workflows/test-e2e.yml
vendored
13
.github/workflows/test-e2e.yml
vendored
@@ -82,6 +82,19 @@ jobs:
|
||||
sudo sed -i 's!Defaults!#Defaults!g' /etc/sudoers
|
||||
sudo -E env "PATH=$PATH" make integration-test-consul
|
||||
|
||||
handle-failure:
|
||||
needs:
|
||||
- test-e2e-vault
|
||||
- test-e2e-consul
|
||||
if: always() && github.event_name == 'push' && contains(needs.*.result, 'failure')
|
||||
uses: ./.github/workflows/test-failure-notification.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
actor: ${{ github.triggering_actor }}
|
||||
git-branch: ${{ github.ref_name }}
|
||||
workflow-run-id: ${{ github.run_id }}
|
||||
workflow-name: ${{ github.workflow }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
Reference in New Issue
Block a user