Skip to content

Commit eedc3e9

Browse files
committed
Build with JDK 11 when required
1 parent e686ef6 commit eedc3e9

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ jobs:
9696
key: gradle-examples-${{ matrix.db }}-${{ steps.get-date.outputs.yearmonth }}
9797
- name: Set up JDK 11
9898
uses: actions/[email protected]
99+
if: ${{ startsWith( inputs.branch, 'wip/2' ) }}
100+
with:
101+
distribution: 'temurin'
102+
java-version: 11
103+
- name: Set up JDK 17
104+
uses: actions/[email protected]
105+
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }}
99106
with:
100107
distribution: 'temurin'
101108
java-version: 11
@@ -138,6 +145,13 @@ jobs:
138145
key: gradle-db-${{ matrix.db }}-${{ steps.get-date.outputs.yearmonth }}
139146
- name: Set up JDK 11
140147
uses: actions/[email protected]
148+
if: ${{ startsWith( inputs.branch, 'wip/2' ) }}
149+
with:
150+
distribution: 'temurin'
151+
java-version: 11
152+
- name: Set up JDK 17
153+
uses: actions/[email protected]
154+
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }}
141155
with:
142156
distribution: 'temurin'
143157
java-version: 11
@@ -244,13 +258,20 @@ jobs:
244258
- name: Export path to JDK ${{ matrix.java.name }}
245259
id: testjdk-exportpath
246260
run: echo "::set-output name=path::${JAVA_HOME}"
247-
# Always use JDK 11 to build the main code: that's what we use for releases.
248261
- name: Set up JDK 11
249262
uses: actions/[email protected]
250263
with:
251264
distribution: 'temurin'
252265
java-version: 11
253266
check-latest: true
267+
if: ${{ startsWith( inputs.branch, 'wip/2' ) }}
268+
- name: Set up JDK 17
269+
uses: actions/[email protected]
270+
with:
271+
distribution: 'temurin'
272+
java-version: 11
273+
check-latest: true
274+
if: ${{ !startsWith( inputs.branch, 'wip/2' ) }}
254275
- name: Export path to JDK 11
255276
id: mainjdk-exportpath
256277
run: echo "::set-output name=path::${JAVA_HOME}"

0 commit comments

Comments
 (0)