Skip to content

Commit 713932a

Browse files
authored
Infra: Discord hook for failed CVE runs (#219)
1 parent a8811d1 commit 713932a

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/cve_checks.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permissions:
99
contents: read
1010

1111
jobs:
12+
1213
build-and-test:
1314
runs-on: ubuntu-latest
1415

@@ -67,3 +68,12 @@ jobs:
6768
image-ref: "ghcr.io/kafbat/kafka-ui:${{ steps.build.outputs.version }}"
6869
format: "table"
6970
exit-code: "1"
71+
72+
notify:
73+
needs: build-and-test
74+
if: ${{ always() && needs.build-and-test.result == 'failure' }}
75+
uses: ./.github/workflows/infra_discord_hook.yml
76+
with:
77+
message: "Attention! CVE checks run failed! Please fix them CVEs :("
78+
secrets:
79+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL_CVE }}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Discord hook'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
message:
7+
description: 'Message text'
8+
required: true
9+
type: string
10+
secrets:
11+
DISCORD_WEBHOOK_URL:
12+
required: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
19+
hook:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Notify Discord on Failure
23+
uses: Ilshidur/action-discord@0.3.2
24+
with:
25+
args: ${{ inputs.message }}
26+
env:
27+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}

0 commit comments

Comments
 (0)