From 024b3ec08c5bd46980727bc1737acbbe59e65e02 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Sat, 22 Apr 2023 11:10:10 +0200 Subject: [PATCH] CI: Test PR head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit by default, Github tests a hypothetical merged state, which can lead to PRs being red although they are perfectly fine. That’s annoying. https://frontside.com/blog/2020-05-26-github-actions-pull_request/#how-does-pull_request-affect-actionscheckout --- .github/workflows/ci-spectec.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-spectec.yml b/.github/workflows/ci-spectec.yml index 5568044f82..0325dcf896 100644 --- a/.github/workflows/ci-spectec.yml +++ b/.github/workflows/ci-spectec.yml @@ -17,7 +17,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Setup OCaml uses: ocaml/setup-ocaml@v2 with: