@@ -20,52 +20,7 @@ permissions:
2020 contents : read
2121
2222jobs :
23- changes :
24- runs-on : ubuntu-latest
25- permissions :
26- contents : read
27- pull-requests : read
28- outputs :
29- isTag : ${{ (github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')) && 'true' || 'false' }}
30- parent : ${{ (github.ref_name == 'main' || startsWith(github.ref, 'refs/tags/parent-v') || steps.filter.outputs.parent == 'true') && 'true' || 'false' }}
31- bom : ${{ (github.ref_name == 'main' || steps.filter.outputs.bom == 'true') && 'true' || 'false' }}
32- api : ${{ (github.ref_name == 'main' || steps.filter.outputs.api == 'true') && 'true' || 'false' }}
33- framework : ${{ (github.ref_name == 'main' || steps.filter.outputs.framework == 'true') && 'true' || 'false' }}
34- extensions : ${{ (github.ref_name == 'main' || steps.filter.outputs.extensions == 'true') && 'true' || 'false' }}
35- steps :
36- - uses : actions/checkout@v6
37- - uses : dorny/paths-filter@v4
38- id : filter
39- if : github.ref_type != 'tag' && github.ref_name != 'main'
40- with :
41- base : ${{ github.base_ref || github.ref }}
42- filters : |
43- parent:
44- - 'pom.xml'
45- - 'license-header'
46- - '.github/workflows/build.yml'
47- - '.github/workflows/maven.yml'
48- bom:
49- - 'bom/**'
50- - '.github/workflows/build.yml'
51- - '.github/workflows/maven.yml'
52- api:
53- - 'api/**'
54- - '.github/workflows/build.yml'
55- - '.github/workflows/maven.yml'
56- framework:
57- - 'framework/**'
58- - '.github/workflows/build.yml'
59- - '.github/workflows/maven.yml'
60- - '.github/workflows/docker.yml'
61- extensions:
62- - 'extensions/**'
63- - '.github/workflows/build.yml'
64- - '.github/workflows/maven.yml'
65-
6623 build-parent :
67- needs : changes
68- if : ${{ needs.changes.outputs.isTag == 'true' || needs.changes.outputs.parent == 'true' }}
6924 uses : ./.github/workflows/maven.yml
7025 permissions :
7126 contents : write
7833 maven-args : " -N"
7934
8035 build-bom :
81- needs : [changes, build-parent]
82- if : |
83- always() && !failure() && !cancelled() &&
84- (needs.changes.outputs.isTag == 'true' || needs.changes.outputs.bom == 'true' || needs.changes.outputs.parent == 'true')
36+ needs : [build-parent]
8537 uses : ./.github/workflows/maven.yml
8638 permissions :
8739 contents : write
9345 maven-phase : ${{ (github.ref_name == 'main' || github.ref_type == 'tag') && 'deploy' || 'install' }}
9446
9547 build-api :
96- needs : [changes, build-parent, build-bom]
97- if : |
98- always() && !failure() && !cancelled() &&
99- (needs.changes.outputs.isTag == 'true' || needs.changes.outputs.parent == 'true' || needs.changes.outputs.bom == 'true' || needs.changes.outputs.api == 'true')
48+ needs : [build-parent, build-bom]
10049 uses : ./.github/workflows/maven.yml
10150 permissions :
10251 contents : write
@@ -108,10 +57,7 @@ jobs:
10857 maven-phase : ${{ (github.ref_name == 'main' || github.ref_type == 'tag') && 'deploy' || 'install' }}
10958
11059 build-framework :
111- needs : [changes, build-parent, build-bom, build-api]
112- if : |
113- always() && !failure() && !cancelled() &&
114- (needs.changes.outputs.isTag == 'true' || needs.changes.outputs.framework == 'true' || needs.changes.outputs.parent == 'true' || needs.changes.outputs.bom == 'true' || needs.changes.outputs.api == 'true')
60+ needs : [build-parent, build-bom, build-api]
11561 uses : ./.github/workflows/maven.yml
11662 permissions :
11763 contents : write
@@ -138,10 +84,7 @@ jobs:
13884 image-name : ${{ github.repository }}-framework
13985
14086 build-extensions :
141- needs : [changes, build-parent, build-bom, build-api]
142- if : |
143- always() && !failure() && !cancelled() &&
144- (needs.changes.outputs.isTag == 'true' || needs.changes.outputs.extensions == 'true' || needs.changes.outputs.parent == 'true' || needs.changes.outputs.bom == 'true' || needs.changes.outputs.api == 'true')
87+ needs : [build-parent, build-bom, build-api]
14588 uses : ./.github/workflows/maven.yml
14689 permissions :
14790 contents : write
@@ -156,15 +99,14 @@ jobs:
15699 release :
157100 needs :
158101 [
159- changes,
160102 build-parent,
161103 build-bom,
162104 build-api,
163105 build-framework,
164106 docker-framework,
165107 build-extensions,
166108 ]
167- if : needs.changes.outputs.isTag == 'true'
109+ if : github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
168110 uses : ./.github/workflows/release.yml
169111 permissions :
170112 contents : write
0 commit comments