From 89af7a8fac5de58f0d738c79b0c09cea1e67a31c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 3 Feb 2023 12:29:21 +0100 Subject: [PATCH] Use base ref instead of base sha. --- .github/workflows/_shared-docs-build-pr.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_shared-docs-build-pr.yml b/.github/workflows/_shared-docs-build-pr.yml index 0525eeb..cb60c16 100644 --- a/.github/workflows/_shared-docs-build-pr.yml +++ b/.github/workflows/_shared-docs-build-pr.yml @@ -303,7 +303,12 @@ jobs: - name: Checkout BASE uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.base.sha }} + # Use base.ref, not base.sha, to make sure we do not get a checkout of the base at an earlier time + # (when the PR's branch was branched off the PR's target branch), but right now. Without this there + # will be a potentially large list of changes since the merge commit we check out for HEAD is based + # on a far newer version. I'm not 100% sure whether this is also a good idea for the closed event + # though... + ref: ${{ github.event.pull_request.base.ref }} path: ${{ steps.vars.outputs.checkout-path }} persist-credentials: false