-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Use file filters action instead of Github's files filter #24877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b53df6d
Use file filters action instead of Github's files filter
lunny 7644f66
Fix docs build
lunny ee66be1
Remove unnecessary check
lunny 118df78
Apply suggestions from code review
lunny 2706af3
Use reuse workflow
lunny cea9a40
Merge branch 'main' into lunny/fix_docs_build
lunny d9c3e3e
Merge branch 'lunny/fix_docs_build' of github.com:lunny/gitea into lu…
lunny c94afc8
Merge branch 'main' into lunny/fix_docs_build
lunny 750e459
Apply suggestions from code review
lunny 964da42
fix typos
silverwind 4d2e851
Update .github/workflows/files-changed.yml
silverwind 98f7613
Merge branch 'main' into lunny/fix_docs_build
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: files changed | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
docs: | ||
description: "wehther docs files changed" | ||
value: ${{ jobs.files-changed.outputs.docs }} | ||
backend: | ||
description: "wehther backend files changed" | ||
value: ${{ jobs.files-changed.outputs.backend }} | ||
frontend: | ||
description: "wehther frontend files changed" | ||
value: ${{ jobs.files-changed.outputs.frontend }} | ||
silverwind marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
jobs: | ||
files-changed: | ||
name: detect what files changed | ||
silverwind marked this conversation as resolved.
Show resolved
Hide resolved
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
# Map a step output to a job output | ||
outputs: | ||
docs: ${{ steps.changes.outputs.docs }} | ||
backend: ${{ steps.changes.outputs.backend }} | ||
frontend: ${{ steps.changes.outputs.frontend }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check for backend file changes | ||
uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: .github/file-filters.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected] | |
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest | ||
GO_LICENSES_PACKAGE ?= github.com/google/[email protected] | ||
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest | ||
ACTION_LINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@latest | ||
lunny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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-action lint action workflow files" | ||
lunny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@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-action | ||
lint-action: | ||
lunny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
actionlint | ||
lunny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
.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 $(ACTION_LINT_PACKAGE) | ||
lunny marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
node_modules: package-lock.json | ||
npm install --no-save | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.