Skip to content

Commit b6ddd27

Browse files
author
Dennis Labordus
committed
Build image when build started by PR.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 64f11fb commit b6ddd27

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/build-project.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,9 @@ jobs:
5050
with:
5151
output_file: custom_maven_settings.xml
5252
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
53+
- name: Build Native with Maven
54+
if: ${{ github.event_name == 'pull_request' }}
55+
run: ./mvnw -s custom_maven_settings.xml -B -Pbuild-image clean verify
5356
- name: Build with Maven
57+
if: ${{ github.event_name == 'push' }}
5458
run: ./mvnw -s custom_maven_settings.xml -B clean verify

.github/workflows/release-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ jobs:
6666
./mvnw -B -s custom_maven_settings.xml \
6767
-DaltDeploymentRepository=github-packages-compas::default::https://maven.pkg.github.com/com-pas/compas-scl-validator \
6868
-Dmaven.deploy.skip=snapshots \
69-
-Prelease clean deploy
69+
-Pbuild-image,release clean deploy
7070
env:
7171
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

app/pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,22 @@ SPDX-License-Identifier: Apache-2.0
169169
</build>
170170

171171
<profiles>
172+
<profile>
173+
<id>build-image</id>
174+
175+
<properties>
176+
<!-- Make a Docker Image, so the integration tests will be executed against the container -->
177+
<quarkus.container-image.build>true</quarkus.container-image.build>
178+
</properties>
179+
</profile>
180+
172181
<profile>
173182
<id>native</id>
174183

175184
<properties>
176185
<quarkus.package.type>native</quarkus.package.type>
177186
<!-- Allows for creating a Linux executable without GraalVM being installed -->
178187
<quarkus.native.container-build>true</quarkus.native.container-build>
179-
<!-- Also make a Docker Image, so the native test will be executed against the container -->
180-
<quarkus.container-image.build>true</quarkus.container-image.build>
181188
<quarkus.native.additional-build-args>
182189
--allow-incomplete-classpath
183190
</quarkus.native.additional-build-args>
@@ -228,7 +235,6 @@ SPDX-License-Identifier: Apache-2.0
228235
<id>release</id>
229236

230237
<properties>
231-
<quarkus.container-image.build>true</quarkus.container-image.build>
232238
<!-- Properties only used for publishing a native docker image (default to Docker Hub) -->
233239
<quarkus.container-image.push>true</quarkus.container-image.push>
234240
<quarkus.container-image.additional-tags>latest</quarkus.container-image.additional-tags>

0 commit comments

Comments
 (0)