From 71018485bab7df17ebd0f349d91e17696b931a3f 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..36ad741d 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