From 763afdc546b8ea88a69ba9d038fccb9b41d58e04 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 12 Mar 2025 21:03:40 +0100 Subject: [PATCH] ci: update CI workflows to include path filters --- .gitea/workflows/ci.yml | 8 ++++++++ .gitea/workflows/release.yml | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a19b587..0a64d78 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,10 +2,15 @@ name: CI on: pull_request: + paths: + - 'backend/**' + - 'frontend/**' + - '.gitea/workflows/ci.yml' jobs: checkstyle: name: "Checkstyle Main" + if: ${{ contains(github.event.pull_request.changed_files_json, 'backend/') || contains(github.event.pull_request.changed_files_json, '.gitea/workflows/ci.yml') }} container: image: "cimg/openjdk:23.0-node" steps: @@ -32,6 +37,7 @@ jobs: eslint: name: eslint + if: ${{ contains(github.event.pull_request.changed_files_json, 'frontend/') || contains(github.event.pull_request.changed_files_json, '.gitea/workflows/ci.yml') }} container: image: catthehacker/ubuntu:act-latest steps: @@ -58,6 +64,7 @@ jobs: prettier: name: prettier + if: ${{ contains(github.event.pull_request.changed_files_json, 'frontend/') || contains(github.event.pull_request.changed_files_json, '.gitea/workflows/ci.yml') }} container: image: catthehacker/ubuntu:act-latest steps: @@ -84,6 +91,7 @@ jobs: test-build: name: test-build + if: ${{ contains(github.event.pull_request.changed_files_json, 'frontend/') || contains(github.event.pull_request.changed_files_json, '.gitea/workflows/ci.yml') }} container: image: catthehacker/ubuntu:act-latest steps: diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 596c53d..ab95401 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -3,6 +3,11 @@ on: push: branches: - "main" + paths: + - 'backend/**' + - 'frontend/**' + - '.gitea/workflows/release.yml' + - 'release.config.cjs' env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}