mirror of
https://github.com/go-gitea/gitea
synced 2024-11-17 07:34:25 +00:00
2ab5f05f40
Fixes https://github.com/go-gitea/gitea/issues/30082. Adds a new linter that searches for non-existant SVG images in templates. Output before the fix was: ``` $ make lint-templates SVG "octicon-warning" not found, used in templates/devtest/flex-list.tmpl SVG "octicon-warning" not found, used in templates/devtest/flex-list.tmpl SVG "octicon-markup" not found, used in templates/repo/diff/comment_form.tmpl make: *** [Makefile:438: lint-templates] Error 1 ``` <img width="306" alt="Screenshot 2024-03-25 at 23 31 05" src="https://github.com/go-gitea/gitea/assets/115237/1052d1a9-bfec-4d5a-9cae-f895f78f7c93">
100 lines
2.7 KiB
YAML
100 lines
2.7 KiB
YAML
name: files-changed
|
|
|
|
on:
|
|
workflow_call:
|
|
outputs:
|
|
backend:
|
|
value: ${{ jobs.detect.outputs.backend }}
|
|
frontend:
|
|
value: ${{ jobs.detect.outputs.frontend }}
|
|
docs:
|
|
value: ${{ jobs.detect.outputs.docs }}
|
|
actions:
|
|
value: ${{ jobs.detect.outputs.actions }}
|
|
templates:
|
|
value: ${{ jobs.detect.outputs.templates }}
|
|
docker:
|
|
value: ${{ jobs.detect.outputs.docker }}
|
|
swagger:
|
|
value: ${{ jobs.detect.outputs.swagger }}
|
|
yaml:
|
|
value: ${{ jobs.detect.outputs.yaml }}
|
|
|
|
jobs:
|
|
detect:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 3
|
|
outputs:
|
|
backend: ${{ steps.changes.outputs.backend }}
|
|
frontend: ${{ steps.changes.outputs.frontend }}
|
|
docs: ${{ steps.changes.outputs.docs }}
|
|
actions: ${{ steps.changes.outputs.actions }}
|
|
templates: ${{ steps.changes.outputs.templates }}
|
|
docker: ${{ steps.changes.outputs.docker }}
|
|
swagger: ${{ steps.changes.outputs.swagger }}
|
|
yaml: ${{ steps.changes.outputs.yaml }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dorny/paths-filter@v3
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
backend:
|
|
- "**/*.go"
|
|
- "templates/**/*.tmpl"
|
|
- "assets/emoji.json"
|
|
- "go.mod"
|
|
- "go.sum"
|
|
- "Makefile"
|
|
- ".golangci.yml"
|
|
- ".editorconfig"
|
|
- "options/locale/locale_en-US.ini"
|
|
|
|
frontend:
|
|
- "**/*.js"
|
|
- "web_src/**"
|
|
- "assets/emoji.json"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
- "Makefile"
|
|
- ".eslintrc.yaml"
|
|
- ".stylelintrc.yaml"
|
|
- ".npmrc"
|
|
|
|
docs:
|
|
- "**/*.md"
|
|
- "docs/**"
|
|
- ".markdownlint.yaml"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
|
|
actions:
|
|
- ".github/workflows/*"
|
|
- "Makefile"
|
|
|
|
templates:
|
|
- "tools/lint-templates-*.js"
|
|
- "templates/**/*.tmpl"
|
|
- "pyproject.toml"
|
|
- "poetry.lock"
|
|
|
|
docker:
|
|
- "Dockerfile"
|
|
- "Dockerfile.rootless"
|
|
- "docker/**"
|
|
- "Makefile"
|
|
|
|
swagger:
|
|
- "templates/swagger/v1_json.tmpl"
|
|
- "Makefile"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
- ".spectral.yaml"
|
|
|
|
yaml:
|
|
- "**/*.yml"
|
|
- "**/*.yaml"
|
|
- ".yamllint.yaml"
|
|
- "pyproject.toml"
|
|
- "poetry.lock"
|