Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra: Discord hook for failed CVE runs #219

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/cve_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ permissions:
contents: read

jobs:

build-and-test:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -67,3 +68,12 @@ jobs:
image-ref: "ghcr.io/kafbat/kafka-ui:${{ steps.build.outputs.version }}"
format: "table"
exit-code: "1"

notify:
needs: build-and-test
if: ${{ always() && needs.build-and-test.result == 'failure' }}
uses: ./.github/workflows/infra_discord_hook.yml
with:
message: "Attention! CVE checks run failed! Please fix them CVEs :("
secrets:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL_CVE }}
27 changes: 27 additions & 0 deletions .github/workflows/infra_discord_hook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'Discord hook'

on:
workflow_call:
inputs:
message:
description: 'Message text'
required: true
type: string
secrets:
DISCORD_WEBHOOK_URL:
required: true

permissions:
contents: read

jobs:

hook:
runs-on: ubuntu-latest
steps:
- name: Notify Discord on Failure
uses: Ilshidur/[email protected]
with:
args: ${{ inputs.message }}
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}
Loading