From 1267068d9c6c50a0490534187d5be67acee08179 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Wed, 4 Oct 2023 09:18:24 +0100 Subject: [PATCH] CI: Added path filtering to actions 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 | 8 +++++++- .github/workflows/lint-js.yml | 10 +++++++++- .github/workflows/lint-php.yml | 8 +++++++- .github/workflows/test-migrations.yml | 10 +++++++++- .github/workflows/test-php.yml | 10 +++++++++- 5 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.github/workflows/analyse-php.yml b/.github/workflows/analyse-php.yml index fd56a53ef..4ddf51932 100644 --- a/.github/workflows/analyse-php.yml +++ b/.github/workflows/analyse-php.yml @@ -1,6 +1,12 @@ name: analyse-php -on: [push, pull_request] +on: + push: + paths: + - '**.php' + pull_request: + paths: + - '**.php' jobs: build: diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index a8bd8abb1..0391ce5b5 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -1,6 +1,14 @@ name: lint-js -on: [push, pull_request] +on: + push: + paths: + - '**.js' + - '**.json' + pull_request: + paths: + - '**.js' + - '**.json' jobs: build: diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 75d18b60d..b2f8b3d2b 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -1,6 +1,12 @@ name: lint-php -on: [push, pull_request] +on: + push: + paths: + - '**.php' + pull_request: + paths: + - '**.php' jobs: build: diff --git a/.github/workflows/test-migrations.yml b/.github/workflows/test-migrations.yml index 08e9ba6ef..710fafcf2 100644 --- a/.github/workflows/test-migrations.yml +++ b/.github/workflows/test-migrations.yml @@ -1,6 +1,14 @@ name: test-migrations -on: [push, pull_request] +on: + push: + paths: + - '**.php' + - 'composer.*' + pull_request: + paths: + - '**.php' + - 'composer.*' jobs: build: diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index 96a01f9c9..64b1a2915 100644 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -1,6 +1,14 @@ name: test-php -on: [push, pull_request] +on: + push: + paths: + - '**.php' + - 'composer.*' + pull_request: + paths: + - '**.php' + - 'composer.*' jobs: build: