Skip to content

Commit 54897f5

Browse files
Merge pull request #213 from NHSDigital/mesh-2092-add-slack-notify
mesh-2092: test slack notify
2 parents 6a74f0f + ceaf614 commit 54897f5

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/pull-request.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,19 @@ jobs:
312312
313313
- name: poetry test publish
314314
run: poetry publish -r testpypi
315+
316+
slack-notification:
317+
runs-on: ubuntu-latest
318+
needs:
319+
- coverage
320+
- lint
321+
- publish
322+
if: ${{ always() && github.repository == 'NHSDigital/mesh-sandbox' && github.actor == 'dependabot[bot]' && contains(needs.*.result, 'failure') }}
323+
steps:
324+
- name: Slack Notification
325+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
326+
with:
327+
webhook: ${{ secrets.DEPENDABOT_SLACK_WEBHOOK_URL }}
328+
webhook-type: incoming-webhook
329+
payload: |
330+
text : "Dependabot PR checks failed for ${{ github.repository }}:${{ github.ref }} in PR #${{ github.event.number }}"

0 commit comments

Comments
 (0)