diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2022-11-03 10:01:56 +0100 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-11-05 00:20:58 -0400 |
commit | f652c75f34edc751a63c9a0a4fd695ae5bd11d66 (patch) | |
tree | d8d80b30a5b048402d7e65179d5a33df36536d6c /.github | |
parent | b667cd69ca064869785ac72e5861319e4f40179d (diff) | |
download | serenity-f652c75f34edc751a63c9a0a4fd695ae5bd11d66.zip |
CI: Check out PR merge branch instead of source
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/cmake.yml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 0a493a2041..a40ad36709 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -31,7 +31,17 @@ jobs: arch: 'x86_64' steps: + # Pull requests can trail behind `master` and can cause breakage if merging before running the CI checks on an updated branch. + # Luckily, GitHub creates and maintains a merge branch that is updated whenever the target or source branch is modified. By + # checking this branch out, we gain a stabler `master` at the cost of reproducibility. - uses: actions/checkout@v3 + if: ${{ github.event_name != 'pull_request' }} + + - uses: actions/checkout@v3 + if: ${{ github.event_name == 'pull_request' }} + with: + ref: refs/pull/${{ github.event.pull_request.number }}/merge + # Set default Python to python 3.x, and set Python path such that pip install works properly - uses: actions/setup-python@v4 with: |