diff --git a/.github/workflows/cve_checks.yml b/.github/workflows/cve_checks.yml index bb3dc467e..da8019760 100644 --- a/.github/workflows/cve_checks.yml +++ b/.github/workflows/cve_checks.yml @@ -9,6 +9,7 @@ permissions: contents: read jobs: + build-and-test: runs-on: ubuntu-latest @@ -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 }} diff --git a/.github/workflows/infra_discord_hook.yml b/.github/workflows/infra_discord_hook.yml new file mode 100644 index 000000000..929a19cd4 --- /dev/null +++ b/.github/workflows/infra_discord_hook.yml @@ -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/action-discord@0.3.2 + with: + args: ${{ inputs.message }} + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}