From 3246ac93bb14de31ff91fd2a7d3a620befd213ed Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 29 Jan 2024 22:56:36 -0500 Subject: [PATCH] Use the correct checkout for Code Scanning --- .github/workflows/ci-pipeline.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 4f653587be..e7cc858520 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -96,8 +96,15 @@ jobs: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} - - name: Checkout + - name: Checkout (Branch) uses: actions/checkout@v4 + if: github.event_name == 'push' || github.event_name == 'schedule' + + - name: Checkout (PR Merge) + uses: actions/checkout@v4 + if: github.event_name != 'push' && github.event_name != 'schedule' + with: + ref: "refs/pull/${{ github.event.number }}/merge" - name: Initialize CodeQL uses: github/codeql-action/init@v3