File tree Expand file tree Collapse file tree 10 files changed +104
-678
lines changed
Expand file tree Collapse file tree 10 files changed +104
-678
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # This workflow will build a Java project with Maven
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+ name : Release
5+
6+ on :
7+ push :
8+ tags :
9+ - ' v*'
10+
11+ env :
12+ REGISTRY : ghcr.io
13+ IMAGE_NAME : ${{ github.repository }}
14+
15+ permissions :
16+ contents : read
17+ packages : write
18+
19+ jobs :
20+ release :
21+ name : Build and publish docker image
22+ runs-on : ubuntu-latest
23+ steps :
24+ - name : Checkout repository
25+ uses : actions/checkout@v2
26+
27+ - name : Set up JDK 11
28+ uses : actions/setup-java@v2
29+ with :
30+ java-version : ' 11'
31+ distribution : ' adopt'
32+
33+ - name : Cache maven repository
34+ uses : actions/cache@v2
35+ with :
36+ path : ~/.m2
37+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
38+ restore-keys : ${{ runner.os }}-m2
39+
40+ - name : Extract metadata (tags, labels) and establish version
41+ id : meta
42+ uses : docker/metadata-action@v3
43+ with :
44+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
45+ tags : |
46+ type=semver,pattern={{version}}
47+ sep-labels : " ,"
48+
49+ - name : Log in to the container registry
50+ uses : docker/login-action@v1
51+ with :
52+ registry : ${{ env.REGISTRY }}
53+ username : ${{ github.actor }}
54+ password : ${{ secrets.GITHUB_TOKEN }}
55+
56+ - name : Build and publish docker image
57+ run : |
58+ mvn --batch-mode test jib:build \
59+ -Djib.to.image="${REGISTRY}/${IMAGE_NAME}:${{ steps.meta.outputs.version }}" \
60+ -Djib.container.labels="${{ steps.meta.outputs.labels }}"
Original file line number Diff line number Diff line change 1+ name : Unit tests
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request : { }
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ java_unit_tests :
14+ name : Java unit tests
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v2
20+
21+ - name : Set up JDK 11
22+ uses : actions/setup-java@v2
23+ with :
24+ java-version : ' 11'
25+ distribution : ' adopt'
26+
27+ - name : Cache Maven repository
28+ uses : actions/cache@v2
29+ with :
30+ path : ~/.m2
31+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
32+ restore-keys : ${{ runner.os }}-m2
33+
34+ - name : Run tests
35+ run : mvn --batch-mode test
Original file line number Diff line number Diff line change 33 <extension >
44 <groupId >fr.brouillard.oss</groupId >
55 <artifactId >jgitver-maven-plugin</artifactId >
6- <version >1.5.1 </version >
6+ <version >1.9.0 </version >
77 </extension >
88 </extensions >
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments