aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/checkpatch.yml10
1 files changed, 5 insertions, 5 deletions
diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml
index 622542c..f6acb1b 100644
--- a/.github/workflows/checkpatch.yml
+++ b/.github/workflows/checkpatch.yml
@@ -1,14 +1,10 @@
name: Checkpatch
on:
- push:
- branches:
- - master
pull_request:
+ types: [opened, synchronize, reopened]
branches:
- master
-permissions:
- contents: read
jobs:
checkpatch:
@@ -23,6 +19,10 @@ jobs:
sudo apt-get install -y perl
- name: Run checkpatch.pl
run: |
+ if [ -z "${{ github.base_ref }}" ]; then
+ echo "Not a pull request, skipping checkpatch"
+ exit 0
+ fi
git fetch origin ${{ github.base_ref }}
base_commit=$(git merge-base origin/${{ github.base_ref }} HEAD)
echo "Base commit: $base_commit"