From cf57ac689480d85e7b4659d8fae4a1be4b7a5d94 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Mon, 22 Jul 2024 08:20:46 +0200 Subject: [PATCH] Refs #21286: Add PR check to use GitHub ref Signed-off-by: JesusPoderoso --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 09b7c2e7..988560fd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -43,7 +43,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.fastcdr-branch || github.ref || matrix.supported-branches }} + ref: ${{ github.event.inputs.fastcdr-branch || (github.event_name == 'pull_request' && github.ref) || matrix.supported-branches }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL