File tree Expand file tree Collapse file tree 3 files changed +306
-17
lines changed Expand file tree Collapse file tree 3 files changed +306
-17
lines changed Original file line number Diff line number Diff line change 1
- # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2
- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3
-
4
- # This workflow uses actions that are not certified by GitHub.
5
- # They are provided by a third-party and are governed by
6
- # separate terms of service, privacy policy, and support
7
- # documentation.
8
-
9
1
name : Java CI with Maven
10
2
11
3
on :
14
6
pull_request :
15
7
branches : [ "master" ]
16
8
9
+ permissions :
10
+ contents : read
11
+ packages : write
12
+
13
+ concurrency :
14
+ group : ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress : ${{ github.ref != 'refs/heads/master' }}
16
+
17
17
jobs :
18
18
build :
19
-
20
19
runs-on : ubuntu-latest
21
-
20
+ env :
21
+ QUARKUS_APPLICATION_VERSION : ${{ github.run_number }}
22
+ QUARKUS_CONTAINER_IMAGE_PUSH : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
23
+ QUARKUS_CONTAINER_IMAGE_USERNAME : ${{ github.actor }}
24
+ QUARKUS_CONTAINER_IMAGE_PASSWORD : ${{ secrets.GITHUB_TOKEN }}
22
25
steps :
23
26
- uses : actions/checkout@v3
24
27
- name : Set up JDK 17
27
30
java-version : ' 17'
28
31
distribution : ' temurin'
29
32
cache : maven
30
- - name : Build with Maven
31
- run : ./mvnw -B package
33
+ - name : Build and conditionally push container image with Maven
34
+ env :
35
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36
+ run : ./mvnw -B package -Dquarkus.container-image.build=true
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<module version =" 4" >
3
+ <component name =" NewModuleRootManager" inherit-compiler-output =" true" >
4
+ <exclude-output />
5
+ <orderEntry type =" sourceFolder" forTests =" false" />
6
+ </component >
3
7
<component name =" Quarkus Tools" >
4
8
<option name =" hash" value =" -1943172620" />
5
9
<option name =" version" value =" 1" />
You can’t perform that action at this time.
0 commit comments