summaryrefslogtreecommitdiffstats
path: root/.github/file-filters.yml
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-05-25 09:33:31 +0800
committerGitHub <noreply@github.com>2023-05-25 01:33:31 +0000
commit93c6a9a652460f89fc719024c435cacbb235d302 (patch)
tree1dc3c6a60fe619580fcc949f4b2653f1e722a658 /.github/file-filters.yml
parentd7e669c3719f74340096c212a1228bb11c028652 (diff)
downloadgitea-93c6a9a652460f89fc719024c435cacbb235d302.tar.gz
gitea-93c6a9a652460f89fc719024c435cacbb235d302.zip
Use file filters action instead of Github's files filter (#24877)
Inspired by https://github.com/go-gitea/gitea/pull/24530#issuecomment-1558815301 This PR use a file filter action to do different CI jobs according changed files types. All types are defined in `.github/file-filters.yml`. Now there are 4 types, `docs`, `backend`, `frontend` and `build`. Then if a PR only changed docs files, those CI jobs which passed the conditions will run, and other types are also like this. --------- Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to '.github/file-filters.yml')
-rw-r--r--.github/file-filters.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/.github/file-filters.yml b/.github/file-filters.yml
new file mode 100644
index 0000000000..26231c9364
--- /dev/null
+++ b/.github/file-filters.yml
@@ -0,0 +1,15 @@
+docs: &docs
+ - "**/*.md"
+ - "docs/**"
+
+backend: &backend
+ - "**/*.go"
+ - "**/*.tmpl"
+ - "go.mod"
+ - "go.sum"
+
+frontend: &frontend
+ - "**/*.js"
+ - "web_src/**"
+ - "package.json"
+ - "package-lock.json"