From 572cc805777878e524a2b3bcda1cb31901e24c13 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 14 Oct 2024 10:57:03 +0100 Subject: [PATCH] ci: Restore `pull_request` trigger for `codeql-analysis.yml` --- .github/workflows/ci.yml | 4 ---- .github/workflows/codeql-analysis.yml | 13 ++++++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55136be73..5d5a445be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,10 +105,6 @@ jobs: if: ${{ github.event_name == 'pull_request' }} uses: ./.github/workflows/valgrind-analysis.yml - analyse-codeql: - needs: [lint-cmake, lint-clang] - uses: ./.github/workflows/codeql-analysis.yml - analyse-sonarcloud: needs: [lint-cmake, lint-clang, pr-comment-flags] if: ${{ needs.pr-comment-flags.outputs.no-sonar != 'true' }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 03bad7dc8..c4e6b4775 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,8 +1,19 @@ name: "CodeQL Analysis" +# According to the docs, the CodeQL workflow should be triggered directly by push to master +# and by pull requests (we only run this on open PRs as it's very slow). We also use the +# `workflow_dispatch` event is also enabled to allow manual triggering of the workflow for testing. +# +# We should not trigger this workflow with `workflow_call` as this causes the error: +# "1 configuration present on `master` was not found" +# +# Sadly, this means we can't roll it into our monolithic CI workflow. on: workflow_dispatch: - workflow_call: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + push: + branches: [master] jobs: analyze: