From feb1f41ce6b5b6784c7b7b5c413c8ecd2abaae20 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 16 Mar 2023 16:22:28 +0000 Subject: [PATCH] CI: Check out both the base and PR branches for "recent base" check This should hopefully ensure that we end up with a single Git repository that has both branches in it, enabling `git merge-base --is-ancestor` to work correctly. --- .github/workflows/checks.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9d4977dd1..a39d54a59 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,10 +12,17 @@ jobs: name: Branch base is sufficiently recent runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Check out the base branch + uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Check out the PR branch + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + - name: Ensure branch contains necessary commits for Tekton CI id: tekton # https://github.com/zcash/zcash/pull/6358