aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2025-02-18 23:06:20 +0100
committerBernd Schubert <bernd@bsbernd.com>2025-02-18 23:30:31 +0100
commitc389e09f3564f52ac0cf10719915347e57053b00 (patch)
tree9c29958eed1ee20bc8bd468e8a8c198215162cff /.github/workflows
parent21c87768e400d46c3f7c38edba2f338b7476b0c2 (diff)
downloadlibfuse-c389e09f3564f52ac0cf10719915347e57053b00.tar.gz
github checkpatch test: Fix for non pull requests
It should only run for pull requests. Indentation for the branch to run on was also not right. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Diffstat (limited to '.github/workflows')
-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"