From 879ff11446ac1c939cfa5049dc05e03f3d378580 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Sun, 21 Jul 2024 19:00:15 +0200 Subject: [PATCH] Refs #21286: Apply Edu' suggestions Signed-off-by: JesusPoderoso --- .github/workflows/codeql-analysis.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7048ee2b..09b7c2e7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,13 +12,17 @@ name: "CodeQL" on: - push: - branches: - - 2.2.x + workflow_dispatch: + inputs: + fastcdr-branch: + description: 'Branch or tag of Fast CDR repository' + required: true + type: string + schedule: + - cron: '0 1 * * *' pull_request: - # The branches below must be a subset of the branches above - branches: - - 2.2.x + types: + - review_requested jobs: analyze: @@ -30,6 +34,7 @@ jobs: matrix: os: [windows-2019, ubuntu-22.04, macos-13, ] language: [ 'cpp' ] + supported-branches: [master, 2.2.x, 1.1.x, 1.0.x] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed @@ -37,6 +42,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.fastcdr-branch || github.ref || matrix.supported-branches }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL