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