From f2a98ce5708b52184ba7da5f1d3f947f9f5e9dad Mon Sep 17 00:00:00 2001 From: Dmytro Vyazelenko <696855+vyazelenko@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:09:38 +0100 Subject: [PATCH] [CI] Ensure that the HEAD of the PR branch is checked out instead of the generated merge commit. --- .github/workflows/ci.yml | 2 ++ .github/workflows/codeql.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0445907a52..dd9ed61a9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Cache Gradle dependencies uses: actions/cache@v4 with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0d10699233..24752050fb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -30,6 +30,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Initialize CodeQL uses: github/codeql-action/init@v2