]> BookStack Code Mirror - bookstack/commitdiff
CI: Added path filtering to actions
authorDan Brown <redacted>
Wed, 4 Oct 2023 08:18:24 +0000 (09:18 +0100)
committerDan Brown <redacted>
Wed, 4 Oct 2023 08:18:24 +0000 (09:18 +0100)
In the hope we can make the CI runs a bit more efficient and energy
conscious, by only running when relevant files have changed.

.github/workflows/analyse-php.yml
.github/workflows/lint-js.yml
.github/workflows/lint-php.yml
.github/workflows/test-migrations.yml
.github/workflows/test-php.yml

index fd56a53ef9ac645dd81a0def99862914b9cae77d..4ddf519328c90d9913435f5700361ffc96f98305 100644 (file)
@@ -1,6 +1,12 @@
 name: analyse-php
 
-on: [push, pull_request]
+on:
+  push:
+    paths:
+      - '**.php'
+  pull_request:
+    paths:
+      - '**.php'
 
 jobs:
   build:
index a8bd8abb1b671b3f342303d6c0b947f593a7d87b..0391ce5b5c6467791a1f9893019fae939dde334d 100644 (file)
@@ -1,6 +1,14 @@
 name: lint-js
 
-on: [push, pull_request]
+on:
+  push:
+    paths:
+      - '**.js'
+      - '**.json'
+  pull_request:
+    paths:
+      - '**.js'
+      - '**.json'
 
 jobs:
   build:
index 75d18b60d76fe9678a3ff86872c51402932ee6e4..b2f8b3d2b4a96184bea3904fb9ad618c0e86c19c 100644 (file)
@@ -1,6 +1,12 @@
 name: lint-php
 
-on: [push, pull_request]
+on:
+  push:
+    paths:
+      - '**.php'
+  pull_request:
+    paths:
+      - '**.php'
 
 jobs:
   build:
index 08e9ba6ef761a73d0fafa8e1250158a80cb082ea..710fafcf2ba29a569dca98f9d9a4bb05ad00c3e8 100644 (file)
@@ -1,6 +1,14 @@
 name: test-migrations
 
-on: [push, pull_request]
+on:
+  push:
+    paths:
+      - '**.php'
+      - 'composer.*'
+  pull_request:
+    paths:
+      - '**.php'
+      - 'composer.*'
 
 jobs:
   build:
index 96a01f9c984d4de445e64bd408fe548659e1a47a..64b1a2915915d7b21667697a838513bddcddb0da 100644 (file)
@@ -1,6 +1,14 @@
 name: test-php
 
-on: [push, pull_request]
+on:
+  push:
+    paths:
+      - '**.php'
+      - 'composer.*'
+  pull_request:
+    paths:
+      - '**.php'
+      - 'composer.*'
 
 jobs:
   build: