generated from digitalservicebund/remix-application-template
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (63 loc) · 1.74 KB
/
pipeline.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allow to run this workflow manually
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
packages: ${{ steps.filter.outputs.changes }} # Contains the list of packages that have changed
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
shared: &shared
- "*"
- ".github/**"
- "doc/**"
- "packages/shared/**"
dito:
- *shared
- "packages/dito/**"
tool-finder:
- *shared
- "packages/tool-finder/**"
vulnerability-scan:
uses: ./.github/workflows/scan.yml
secrets: inherit
check-and-test-shared:
needs:
- changes
if: contains(needs.changes.outputs.packages, 'shared')
uses: ./.github/workflows/check-and-test.yml
with:
package: shared
shouldRunIntegrationTests: false
secrets: inherit
check-test-build-deploy:
needs:
- changes
- check-and-test-shared
- vulnerability-scan
# always() ensures that the job runs even if the needed jobs are skipped
if: ${{ always() && (needs.check-and-test-shared.result == 'success' || needs.check-and-test-shared.result == 'skipped') }}
strategy:
fail-fast: false
max-parallel: 1
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
exclude:
- package: shared
uses: ./.github/workflows/test-build-deploy.yml
with:
package: ${{ matrix.package }}
environment: production
secrets: inherit