diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-05-25 09:33:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 01:33:31 +0000 |
commit | 93c6a9a652460f89fc719024c435cacbb235d302 (patch) | |
tree | 1dc3c6a60fe619580fcc949f4b2653f1e722a658 /Makefile | |
parent | d7e669c3719f74340096c212a1228bb11c028652 (diff) | |
download | gitea-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 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -35,6 +35,7 @@ SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.4 XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.6.0 GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest +ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@latest DOCKER_IMAGE ?= gitea/gitea DOCKER_TAG ?= latest @@ -199,6 +200,7 @@ help: @echo " - deps-tools install tool dependencies" @echo " - lint lint everything" @echo " - lint-fix lint everything and fix issues" + @echo " - lint-actions lint action workflow files" @echo " - lint-frontend lint frontend files" @echo " - lint-frontend-fix lint frontend files and fix issues" @echo " - lint-backend lint backend files" @@ -411,6 +413,10 @@ lint-go-vet: lint-editorconfig: $(GO) run $(EDITORCONFIG_CHECKER_PACKAGE) templates .github/workflows +.PHONY: lint-actions +lint-actions: + $(GO) run $(ACTIONLINT_PACKAGE) + .PHONY: watch watch: @bash build/watch.sh @@ -908,6 +914,7 @@ deps-tools: $(GO) install $(XGO_PACKAGE) $(GO) install $(GO_LICENSES_PACKAGE) $(GO) install $(GOVULNCHECK_PACKAGE) + $(GO) install $(ACTIONLINT_PACKAGE) node_modules: package-lock.json npm install --no-save |