14
14
- " .github/workflows/*.yml"
15
15
16
16
jobs :
17
- # Build and test the project
18
17
build :
19
18
if : " !contains(github.event.head_commit.message, 'skip ci')"
20
19
runs-on : ubuntu-24.04
21
20
strategy :
22
21
matrix :
23
- mongodb-version : ["5.0", "6.0", "7.0"]
22
+ mongodb-version : ["5.0", "6.0", "7.0", "8.0" ]
24
23
timeout-minutes : 5
25
24
steps :
26
25
- uses : actions/checkout@v4
27
-
28
26
- name : Set up JDK 21
29
27
uses : actions/setup-java@v4
30
28
with :
31
29
distribution : " temurin"
32
30
java-version : " 21"
33
31
cache : " maven"
34
-
35
32
- name : Build and Test
36
33
run : mvn -B clean verify -Dmongodb.version="${{ matrix.mongodb-version }}"
37
-
38
- - name : Upload build artifacts for Docker jobs
34
+ - name : Upload build artifacts for Docker jobs (only for 8.0)
35
+ if : matrix.mongodb-version == '8.0'
39
36
uses : actions/upload-artifact@v4
40
37
with :
41
38
name : restheart-artifacts
52
49
strategy :
53
50
matrix :
54
51
mongodb-version : ["8.0"]
55
- timeout-minutes : 20
56
52
steps :
57
53
- uses : actions/checkout@v4
58
54
- name : Set up JDK 21
67
63
gpg --pinentry-mode=loopback --batch --yes --fast-import private.key
68
64
env :
69
65
GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
70
- - name : Deploy to Maven Central
66
+ - name : Deploy to Maven Central (8.0 only)
71
67
run : |
72
68
MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED" \
73
69
mvn -B deploy -Pdeploy -Dmongodb.version="${{ matrix.mongodb-version }}" -s settings.xml
84
80
strategy :
85
81
matrix :
86
82
mongodb-version : ["8.0"]
87
- timeout-minutes : 10
88
83
steps :
89
84
- uses : actions/checkout@v4
90
85
- name : Download build artifacts
104
99
with :
105
100
username : ${{ secrets.DOCKER_USER }}
106
101
password : ${{ secrets.DOCKER_TOKEN }}
107
- - name : Build and Push multi-arch Docker images
102
+ - name : Build and Push multi-arch Docker images (8.0 only)
108
103
uses : docker/build-push-action@v6
109
104
with :
110
105
context : ./core/
@@ -126,7 +121,6 @@ jobs:
126
121
strategy :
127
122
matrix :
128
123
mongodb-version : ["8.0"]
129
- timeout-minutes : 10
130
124
steps :
131
125
- uses : actions/checkout@v4
132
126
- name : Download build artifacts
@@ -146,7 +140,7 @@ jobs:
146
140
with :
147
141
username : ${{ secrets.DOCKER_USER }}
148
142
password : ${{ secrets.DOCKER_TOKEN }}
149
- - name : Build and Push GraalVM Docker image
143
+ - name : Build and Push GraalVM Docker image (8.0 only)
150
144
uses : docker/build-push-action@v6
151
145
with :
152
146
context : ./core/
@@ -161,13 +155,12 @@ jobs:
161
155
${{ github.ref == 'refs/heads/master' && 'softinstigate/restheart-snapshot:latest-graalvm' || '' }}
162
156
163
157
build-docker-distroless :
164
- if : " !contains(github.event.head_commit.message, 'skip ci')"
158
+ if : " !contains(github.event.head_commit.message, 'skip ci') && matrix.mongodb-version == '8.0' "
165
159
needs : build
166
160
runs-on : ubuntu-22.04
167
161
strategy :
168
162
matrix :
169
163
mongodb-version : ["8.0"]
170
- timeout-minutes : 10
171
164
steps :
172
165
- uses : actions/checkout@v4
173
166
- name : Download build artifacts
@@ -187,7 +180,7 @@ jobs:
187
180
with :
188
181
username : ${{ secrets.DOCKER_USER }}
189
182
password : ${{ secrets.DOCKER_TOKEN }}
190
- - name : Build and Push distroless docker image
183
+ - name : Build and Push distroless docker image (8.0 only)
191
184
uses : docker/build-push-action@v6
192
185
with :
193
186
context : ./core/
0 commit comments