From 18af1f5b78cd2308d435e1443a22b70d781e3f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Tue, 16 Mar 2021 11:17:15 +0100 Subject: [PATCH] github: run workflows on PR head commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ec39e4b87..a65185f00 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,6 +24,8 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Check that source has been prepared run: | @@ -69,6 +71,8 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Run ShellCheck uses: ludeeus/action-shellcheck@0.5.0 with: @@ -85,6 +89,8 @@ jobs: run: sudo dnf install -y rpmlint rpm-build make git-core - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Create SRPM run: make srpm