CI: checkout HEAD commit rather than merge commit
authorPaul Spooren <mail@aparcar.org>
Fri, 5 Mar 2021 09:16:00 +0000 (23:16 -1000)
committerPaul Spooren <mail@aparcar.org>
Fri, 5 Mar 2021 09:42:32 +0000 (23:42 -1000)
GitHub CI actions/checkout uses a merge commit which isn't compatible
with our formality checks. Instead checkout the pull request HEAD.

Signed-off-by: Paul Spooren <mail@aparcar.org>
.github/workflows/formal.yml

index 7a7a6b0aa14031aaded560c2db8d32aa98deb19c..25609174e8ae6f9dee01640924d2ae26be440d83 100644 (file)
@@ -13,6 +13,7 @@ jobs:
     steps:
       - uses: actions/checkout@v2
         with:
+          ref: ${{ github.event.pull_request.head.sha }}
           fetch-depth: 0
 
       - name: Determine branch name
@@ -23,9 +24,6 @@ jobs:
 
       - name: Test formalities
         run: |
-          # remove GitHubs merge commit
-          git rebase "origin/$BRANCH"
-
           source .github/workflows/ci_helpers.sh
 
           RET=0