File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Java CI
2+
3+ on :
4+ push :
5+ branches : [ '*' ]
6+ pull_request : {}
7+
8+ jobs :
9+ build :
10+ if : ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v2
14+ - name : Cache Maven packages
15+ uses : actions/cache@v2
16+ with :
17+ path : ~/.m2
18+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
19+ restore-keys : ${{ runner.os }}-m2
20+ - name : Set up JDK 8 for toolchain
21+ id : setup-java8
22+ uses : actions/setup-java@v2
23+ with :
24+ java-version : 8
25+ distribution : ' zulu'
26+ - name : Set up JDK 16
27+ uses : actions/setup-java@v2
28+ with :
29+ java-version : 16
30+ distribution : ' zulu'
31+ - name : Build with Maven
32+ run : export JAVA8_HOME=${{ steps.setup-java8.outputs.path }} && mvn -B verify -Dgpg.skip=true --global-toolchains .github/workflows/toolchains.xml
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF8" ?>
2+ <toolchains >
3+ <toolchain >
4+ <type >jdk</type >
5+ <provides >
6+ <version >1.8</version >
7+ </provides >
8+ <configuration >
9+ <jdkHome >${env.JAVA8_HOME}</jdkHome >
10+ </configuration >
11+ </toolchain >
12+ </toolchains >
You can’t perform that action at this time.
0 commit comments