diff --git a/.github/workflows/build_and_unit_test.yml b/.github/workflows/build_and_unit_test.yml index fa72e12f..973879c9 100644 --- a/.github/workflows/build_and_unit_test.yml +++ b/.github/workflows/build_and_unit_test.yml @@ -28,6 +28,8 @@ jobs: if: '!github.event.pull_request.draft' steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Update rustup and install rustc and cargo shell: bash diff --git a/.github/workflows/format_and_lint.yml b/.github/workflows/format_and_lint.yml index e2218526..5edbd932 100644 --- a/.github/workflows/format_and_lint.yml +++ b/.github/workflows/format_and_lint.yml @@ -24,6 +24,8 @@ jobs: if: '!github.event.pull_request.draft' steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Update rustup and install rustfmt shell: bash @@ -43,6 +45,8 @@ jobs: if: '!github.event.pull_request.draft' steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Update rustup and install clippy shell: bash