-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (103 loc) · 2.84 KB
/
build.yml
File metadata and controls
112 lines (103 loc) · 2.84 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Build
on:
push:
branches: ["main"]
paths-ignore: ["**/*.md"]
tags:
- "v*.*.*"
- "parent-v*.*.*"
- "bom-v*.*.*"
- "api-v*.*.*"
- "framework-v*.*.*"
- "extensions-v*.*.*"
pull_request:
branches: ["main"]
paths-ignore: ["**/*.md"]
workflow_dispatch:
permissions:
contents: read
jobs:
build-parent:
uses: ./.github/workflows/maven.yml
permissions:
contents: write
actions: read
packages: write
with:
pom-file: "pom.xml"
# deploy only on main or tag, otherwise install
maven-phase: ${{ (github.ref_name == 'main' || github.ref_type == 'tag') && 'deploy' || 'install' }}
maven-args: "-N"
build-bom:
needs: [build-parent]
uses: ./.github/workflows/maven.yml
permissions:
contents: write
actions: read
packages: write
with:
pom-file: "bom/pom.xml"
# deploy only on main or tag, otherwise install
maven-phase: ${{ (github.ref_name == 'main' || github.ref_type == 'tag') && 'deploy' || 'install' }}
build-api:
needs: [build-parent, build-bom]
uses: ./.github/workflows/maven.yml
permissions:
contents: write
actions: read
packages: write
with:
pom-file: "api/pom.xml"
# deploy only on main or tag, otherwise install
maven-phase: ${{ (github.ref_name == 'main' || github.ref_type == 'tag') && 'deploy' || 'install' }}
build-framework:
needs: [build-parent, build-bom, build-api]
uses: ./.github/workflows/maven.yml
permissions:
contents: write
actions: read
packages: write
with:
pom-file: "framework/pom.xml"
maven-phase: "package"
build-artifact-name: framework-artifact
build-artifact-path: framework/target/
docker-framework:
needs: build-framework
permissions:
contents: read
packages: write
id-token: write
uses: ./.github/workflows/docker.yml
with:
build-artifact-name: framework-artifact
build-artifact-path: framework/target/
docker-file-path: ./framework/Dockerfile
container-image-title: framework
image-name: ${{ github.repository }}-framework
build-extensions:
needs: [build-parent, build-bom, build-api]
uses: ./.github/workflows/maven.yml
permissions:
contents: write
actions: read
packages: write
with:
pom-file: "extensions/pom.xml"
maven-phase: "package"
build-artifact-name: extensions-artifact
build-artifact-path: extensions/**/target/
release:
needs:
[
build-parent,
build-bom,
build-api,
build-framework,
docker-framework,
build-extensions,
]
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
uses: ./.github/workflows/release.yml
permissions:
contents: write