mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 20:58:36 +00:00
Clean up github actions (#24984)
- Merge the file filters into `files-changed.yml` - Remove unused yaml anchors like `&backend` - Merge the `compliance-docs` workflow into `compliance` - Add actions linting - Misc cleanups for whitespace and step names
This commit is contained in:
43
.github/workflows/files-changed.yml
vendored
43
.github/workflows/files-changed.yml
vendored
@@ -1,32 +1,53 @@
|
||||
name: files changed
|
||||
name: files-changed
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
docs:
|
||||
description: "whether docs files changed"
|
||||
value: ${{ jobs.files-changed.outputs.docs }}
|
||||
backend:
|
||||
description: "whether backend files changed"
|
||||
value: ${{ jobs.files-changed.outputs.backend }}
|
||||
value: ${{ jobs.detect.outputs.backend }}
|
||||
frontend:
|
||||
description: "whether frontend files changed"
|
||||
value: ${{ jobs.files-changed.outputs.frontend }}
|
||||
value: ${{ jobs.detect.outputs.frontend }}
|
||||
docs:
|
||||
description: "whether docs files changed"
|
||||
value: ${{ jobs.detect.outputs.docs }}
|
||||
actions:
|
||||
description: "whether actions files changed"
|
||||
value: ${{ jobs.detect.outputs.actions }}
|
||||
|
||||
jobs:
|
||||
files-changed:
|
||||
detect:
|
||||
name: detect which files changed
|
||||
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 }}
|
||||
docs: ${{ steps.changes.outputs.docs }}
|
||||
actions: ${{ steps.changes.outputs.actions }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check for backend file changes
|
||||
uses: dorny/paths-filter@v2
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: changes
|
||||
with:
|
||||
filters: .github/file-filters.yml
|
||||
filters: |
|
||||
backend:
|
||||
- "**/*.go"
|
||||
- "**/*.tmpl"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
|
||||
frontend:
|
||||
- "**/*.js"
|
||||
- "web_src/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
|
||||
docs:
|
||||
- "**/*.md"
|
||||
- "docs/**"
|
||||
|
||||
actions:
|
||||
- ".github/workflows/*"
|
||||
|
Reference in New Issue
Block a user