]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Stops duplicated action runs against internal PRs (#4430)
authorTrenton H <797416+stumpylog@users.noreply.github.com>
Thu, 26 Oct 2023 01:05:52 +0000 (18:05 -0700)
committerGitHub <noreply@github.com>
Thu, 26 Oct 2023 01:05:52 +0000 (01:05 +0000)
.github/workflows/ci.yml

index 7c22e9f987d3e834d03f7fa208247261d3833e1c..249da50a7fd0e2a1a58cd4da9e878fff484c1cc7 100644 (file)
@@ -22,6 +22,13 @@ env:
 
 jobs:
   pre-commit:
+    # We want to run on external PRs, but not on our own internal PRs as they'll be run
+    # by the push to the branch. Without this if check, checks are duplicated since
+    # internal PRs match both the push and pull_request events.
+    if:
+      github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
+      github.repository
+
     name: Linting Checks
     runs-on: ubuntu-22.04
     steps: