github: run workflows on PR head commit

By default, the checkout action checkouts the merge commit. This is different
from what Schutzbot currently does - it runs the test on the PR HEAD commit.
Let's change the GitHub workflows behaviour to the same one as Schutzi
uses.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2021-03-16 11:17:15 +01:00 committed by Tom Gundersen
parent fb089cf00d
commit 18af1f5b78

View file

@ -24,6 +24,8 @@ jobs:
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@v2 uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check that source has been prepared - name: Check that source has been prepared
run: | run: |
@ -69,6 +71,8 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run ShellCheck - name: Run ShellCheck
uses: ludeeus/action-shellcheck@0.5.0 uses: ludeeus/action-shellcheck@0.5.0
with: with:
@ -85,6 +89,8 @@ jobs:
run: sudo dnf install -y rpmlint rpm-build make git-core run: sudo dnf install -y rpmlint rpm-build make git-core
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create SRPM - name: Create SRPM
run: make srpm run: make srpm