|
1 | | -name: workflow - trigger pull request quality assurance |
| 1 | +name: pipeline ci/cd — trigger pull request quality assurance |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
5 | 5 | branches: |
6 | | - - master |
| 6 | + - main |
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 | changes: |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | outputs: |
12 | | - backend: ${{ steps.filter.outputs.backend }} |
| 12 | + federation_backend: ${{ steps.filter.outputs.federation_backend }} |
| 13 | + federation_proxy: ${{ steps.filter.outputs.federation_proxy }} |
| 14 | + federation_contracts: ${{ steps.filter.outputs.federation_contracts }} |
13 | 15 | federation_sdk: ${{ steps.filter.outputs.federation_sdk }} |
14 | | - federation_sdk_contracts: ${{ steps.filter.outputs.federation_sdk_contracts }} |
15 | 16 |
|
16 | 17 | steps: |
17 | 18 | - name: checkout |
18 | | - uses: actions/checkout@v4 |
| 19 | + uses: actions/checkout@v5 |
19 | 20 |
|
20 | 21 | - name: detect changed paths |
21 | 22 | id: filter |
22 | | - uses: dorny/paths-filter@v3 |
| 23 | + uses: dorny/paths-filter@v4 |
23 | 24 | with: |
24 | 25 | filters: | |
25 | | - backend: |
| 26 | + federation_backend: |
26 | 27 | - 'Applications/Backend/**' |
| 28 | + federation_proxy: |
| 29 | + - 'Applications/Proxy/**' |
| 30 | + federation_contracts: |
| 31 | + - 'Packages/Federation.Sdk.Contracts/**' |
27 | 32 | federation_sdk: |
28 | 33 | - 'Packages/Federation.Sdk/**' |
29 | | - federation_sdk_contracts: |
30 | | - - 'Packages/Federation.Sdk.Contracts/**' |
31 | 34 |
|
| 35 | + # run build and tests for federation backend if there are changes in the corresponding path |
32 | 36 | quality-assurance-backend: |
33 | 37 | needs: changes |
34 | | - if: needs.changes.outputs.backend == 'true' |
35 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 38 | + if: needs.changes.outputs.federation_backend == 'true' |
| 39 | + uses: ./.github/workflows/template-quality-assurance.yml |
36 | 40 | with: |
37 | 41 | service_path: Applications/Backend |
38 | 42 |
|
39 | | - quality-assurance-federation-sdk: |
| 43 | + # run build and tests for federation proxy if there are changes in the corresponding path |
| 44 | + quality-assurance-proxy: |
40 | 45 | needs: changes |
41 | | - if: needs.changes.outputs.federation_sdk == 'true' |
42 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 46 | + if: needs.changes.outputs.federation_proxy == 'true' |
| 47 | + uses: ./.github/workflows/template-quality-assurance.yml |
43 | 48 | with: |
44 | | - service_path: Packages/Federation.Sdk |
| 49 | + service_path: Applications/Proxy |
45 | 50 |
|
46 | | - quality-assurance-federation-sdk-contracts: |
| 51 | + # run build and tests for federation contracts if there are changes in the corresponding path |
| 52 | + quality-assurance-contracts: |
47 | 53 | needs: changes |
48 | | - if: needs.changes.outputs.federation_sdk_contracts == 'true' |
49 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 54 | + if: needs.changes.outputs.federation_contracts == 'true' |
| 55 | + uses: ./.github/workflows/template-quality-assurance.yml |
50 | 56 | with: |
51 | 57 | service_path: Packages/Federation.Sdk.Contracts |
| 58 | + |
| 59 | + # run build and tests for federation sdk if there are changes in the corresponding path |
| 60 | + quality-assurance-sdk: |
| 61 | + needs: changes |
| 62 | + if: needs.changes.outputs.federation_sdk == 'true' |
| 63 | + uses: ./.github/workflows/template-quality-assurance.yml |
| 64 | + with: |
| 65 | + service_path: Packages/Federation.Sdk |
0 commit comments