-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (48 loc) · 1.88 KB
/
action-check-for-changes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: "Check for file changes"
on:
workflow_call:
outputs:
hasAzureChanges:
description: "Azure related files changed"
value: ${{ jobs.check-for-changes.outputs.hasAzureChanges }}
hasBackendChanges:
description: "Backend related files changed"
value: ${{ jobs.check-for-changes.outputs.hasBackendChanges }}
hasSlackNotifierChanges:
description: "Slack Notifier function related files changed"
value: ${{ jobs.check-for-changes.outputs.hasSlackNotifierChanges }}
hasMigrationChanges:
description: "Migration related files changed"
value: ${{ jobs.check-for-changes.outputs.hasMigrationChanges }}
jobs:
check-for-changes:
name: Filter
runs-on: ubuntu-latest
outputs:
hasBackendChanges: ${{ steps.filter.outputs.backend_any_changed == 'true' }}
hasAzureChanges: ${{ steps.filter.outputs.azure_any_changed == 'true' }}
hasSlackNotifierChanges: ${{ steps.filter.outputs.slackNotifier_any_changed == 'true'}}
hasMigrationChanges: ${{ steps.filter.outputs.migration_any_changed == 'true'}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# fetch-depth needs to be 0 in cases where we want to fetch changes since previous tag for example
fetch-depth: 0
- uses: tj-actions/changed-files@v44
id: filter
with:
files_yaml: |
backend:
- '.github/**/*'
- 'src/**/*'
- '.azure/applications/**/*'
azure:
- '.github/**/*'
- '.azure/infrastructure/**/*'
- '.azure/modules/**/*'
slackNotifier:
- '.github/**/*'
- 'src/Digdir.Tool.Dialogporten.SlackNotifier/**/*'
migration:
- 'src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/**/*'