From 0b9bc193f38693402a3cd75065dec1c5999fc946 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 16 Nov 2023 14:44:43 -0500 Subject: [PATCH] Run CodeQL analysis on pushes to the main branch too (#46233) --- .github/workflows/codeql.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3453d6915d..ea8d061887 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -11,6 +11,11 @@ on: paths: - '**/*.js' - '.github/workflows/codeql.yml' + # This is so that when CodeQL runs on a pull request, it can compare + # against the state of the base branch. + push: + branches: + - main permissions: actions: read @@ -33,3 +38,9 @@ jobs: languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp, ruby} - uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 continue-on-error: true + + - uses: ./.github/actions/slack-alert + if: ${{ failure() && github.event_name != 'pull_request' }} + with: + slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} + slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}