2023-05-30 00:31:00 -05:00
|
|
|
name: files-changed
|
2023-05-24 20:33:31 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
outputs:
|
|
|
|
backend:
|
|
|
|
description: "whether backend files changed"
|
2023-05-30 00:31:00 -05:00
|
|
|
value: ${{ jobs.detect.outputs.backend }}
|
2023-05-24 20:33:31 -05:00
|
|
|
frontend:
|
|
|
|
description: "whether frontend files changed"
|
2023-05-30 00:31:00 -05:00
|
|
|
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 }}
|
2023-05-24 20:33:31 -05:00
|
|
|
|
|
|
|
jobs:
|
2023-05-30 00:31:00 -05:00
|
|
|
detect:
|
2023-05-24 20:33:31 -05:00
|
|
|
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 }}
|
2023-05-30 00:31:00 -05:00
|
|
|
docs: ${{ steps.changes.outputs.docs }}
|
|
|
|
actions: ${{ steps.changes.outputs.actions }}
|
2023-05-24 20:33:31 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-05-30 00:31:00 -05:00
|
|
|
- uses: dorny/paths-filter@v2
|
2023-05-24 20:33:31 -05:00
|
|
|
id: changes
|
|
|
|
with:
|
2023-05-30 00:31:00 -05:00
|
|
|
filters: |
|
|
|
|
backend:
|
|
|
|
- "**/*.go"
|
|
|
|
- "**/*.tmpl"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
- "**/*.js"
|
|
|
|
- "web_src/**"
|
|
|
|
- "package.json"
|
|
|
|
- "package-lock.json"
|
|
|
|
|
|
|
|
docs:
|
|
|
|
- "**/*.md"
|
|
|
|
- "docs/**"
|
|
|
|
|
|
|
|
actions:
|
|
|
|
- ".github/workflows/*"
|