Skip to content

Commit 9b58ae5

Browse files
areyCopilot
andcommitted
ci: factorize Java version as workflow-level env variable
Replace matrix.java in linux and benchmark jobs with a single JAVA_VERSION env variable defined at the workflow level. Also fix benchmark job which was referencing matrix.java without defining it, and correct linux job name (JDK 8 → JDK 17). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9336794 commit 9b58ae5

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ on:
99
branches:
1010
- '*'
1111

12+
env:
13+
JAVA_VERSION: '17'
14+
1215
jobs:
1316
linux:
14-
name: 'Linux (JDK 8)'
17+
name: 'Linux (JDK 17)'
1518
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
java: [ '17' ]
1919

2020
steps:
2121
- uses: actions/checkout@v4.1.1
22-
- name: Set up JDK ${{matrix.java}}
22+
- name: Set up JDK ${{ env.JAVA_VERSION }}
2323
uses: actions/setup-java@v4
2424
with:
25-
java-version: ${{matrix.java}}
25+
java-version: ${{ env.JAVA_VERSION }}
2626
distribution: 'adopt'
2727
cache: maven
2828
- name: 'Test'
@@ -37,10 +37,10 @@ jobs:
3737
mapper: [Manual, MapStruct, Selma, JMapper, datus, Orika, ModelMapper, BULL, Dozer, ReMap]
3838
steps:
3939
- uses: actions/checkout@v4.1.1
40-
- name: Set up JDK ${{matrix.java}}
40+
- name: Set up JDK ${{ env.JAVA_VERSION }}
4141
uses: actions/setup-java@v4
4242
with:
43-
java-version: ${{matrix.java}}
43+
java-version: ${{ env.JAVA_VERSION }}
4444
distribution: 'adopt'
4545
cache: maven
4646
- name: 'Install'

0 commit comments

Comments
 (0)