mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[CodeQL] Added notification to slack on job failure (#210962)
## Summary Added notification to slack on job failure. __Closes: https://github.com/elastic/kibana/issues/210957__ --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
67f6fd3ec8
commit
80ea2be300
1 changed files with 10 additions and 2 deletions
12
.github/workflows/codeql.yml
vendored
12
.github/workflows/codeql.yml
vendored
|
@ -31,7 +31,6 @@ jobs:
|
|||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
debug: ${{ matrix.branch != '7.17' }}
|
||||
|
||||
# TODO: Possibly required to follow all call paths, however, when enabled, the step below runs out of memory.
|
||||
# Possible workarounds: Apply for access to the GitHub beta where we can use beefier machines, or run it ourselves on Buildkite
|
||||
|
@ -65,11 +64,20 @@ jobs:
|
|||
category: "/language:${{matrix.language}}"
|
||||
ref: ${{ env.CHECKOUT_REF }}
|
||||
sha: ${{ env.CHECKOUT_SHA }}
|
||||
- name: Notify to slack on failure
|
||||
if: ${{ failure() }}
|
||||
uses: slackapi/slack-github-action@v2.0.0
|
||||
with:
|
||||
method: chat.postMessage
|
||||
token: ${{ secrets.CODE_SCANNING_SLACK_TOKEN }}
|
||||
payload: |
|
||||
channel: ${{ secrets.CODE_SCANNING_SLACK_CHANNEL_ID }}
|
||||
text: ":broken_heart: CodeQL analysis failed for ${{ github.repository }} on ${{ env.CHECKOUT_SHA }}."
|
||||
alert:
|
||||
name: Alert
|
||||
runs-on: ubuntu-latest
|
||||
needs: analyze
|
||||
if: github.repository == 'elastic/kibana' # Hack: Do not run on forks
|
||||
if: ${{ github.repository == 'elastic/kibana' && success() }} # Hack: Do not run on forks
|
||||
steps:
|
||||
- name: Checkout kibana-operations
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue