mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-25 07:34:01 +01:00
d783384c19
- 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
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: files-changed
|
|
|
|
on:
|
|
workflow_call:
|
|
outputs:
|
|
backend:
|
|
description: "whether backend files changed"
|
|
value: ${{ jobs.detect.outputs.backend }}
|
|
frontend:
|
|
description: "whether frontend files changed"
|
|
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:
|
|
detect:
|
|
name: detect which files changed
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 3
|
|
# Map a step output to a job output
|
|
outputs:
|
|
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
|
|
- uses: dorny/paths-filter@v2
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
backend:
|
|
- "**/*.go"
|
|
- "**/*.tmpl"
|
|
- "go.mod"
|
|
- "go.sum"
|
|
|
|
frontend:
|
|
- "**/*.js"
|
|
- "web_src/**"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
|
|
docs:
|
|
- "**/*.md"
|
|
- "docs/**"
|
|
|
|
actions:
|
|
- ".github/workflows/*"
|