Skip to content

Commit 79bc916

Browse files
authored
Configured workflow with jdk17 environment (#554)
1 parent 0b86512 commit 79bc916

File tree

1 file changed

+12
-35
lines changed

1 file changed

+12
-35
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,17 @@ jobs:
2121
# The type of runner that the job will run on
2222
runs-on: ubuntu-latest
2323
env:
24-
JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64
2524
M2_HOME: /opt/apache-maven-3.6.3
2625
MAVEN_HOME: /opt/apache-maven-3.6.3
2726

2827
# Steps represent a sequence of tasks that will be executed as part of the job
2928
steps:
3029
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3130
- uses: actions/checkout@v3
32-
33-
# Runs a set of commands using the runners shell
34-
# Run before every job
35-
- name: Install Java
36-
run: |
37-
sudo apt-get update
38-
sudo apt-get install -y openjdk-8-jdk
39-
java -version
40-
uname -a
41-
chmod +x pom.xml
31+
- uses: actions/setup-java@v3
32+
with:
33+
distribution: 'temurin'
34+
java-version: '17'
4235

4336
- name: Install Maven
4437
shell: bash
@@ -65,25 +58,17 @@ jobs:
6558
runs-on: ubuntu-latest
6659

6760
env:
68-
JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64
6961
M2_HOME: /opt/apache-maven-3.6.3
7062
MAVEN_HOME: /opt/apache-maven-3.6.3
7163

7264
# Steps represent a sequence of tasks that will be executed as part of the job
7365
steps:
7466
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
7567
- uses: actions/checkout@v3
76-
77-
# Runs a set of commands using the runners shell
78-
# Run before every job
79-
- name: Install Java
80-
run: |
81-
sudo apt-get update
82-
sudo apt-get install -y openjdk-8-jdk
83-
java -version
84-
uname -a
85-
chmod +x pom.xml
86-
mvn --version
68+
- uses: actions/setup-java@v3
69+
with:
70+
distribution: 'temurin'
71+
java-version: '17'
8772

8873
- name: Install Maven
8974
shell: bash
@@ -110,25 +95,17 @@ jobs:
11095
# The type of runner that the job will run on
11196
runs-on: ubuntu-latest
11297
env:
113-
JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-amd64
11498
M2_HOME: /opt/apache-maven-3.6.3
11599
MAVEN_HOME: /opt/apache-maven-3.6.3
116100

117101
# Steps represent a sequence of tasks that will be executed as part of the job
118102
steps:
119103
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
120104
- uses: actions/checkout@v3
121-
122-
# Runs a set of commands using the runners shell
123-
# Run before every job
124-
- name: Install Java
125-
run: |
126-
sudo apt-get update
127-
sudo apt-get install -y openjdk-8-jdk
128-
java -version
129-
uname -a
130-
chmod +x pom.xml
131-
mvn --version
105+
- uses: actions/setup-java@v3
106+
with:
107+
distribution: 'temurin'
108+
java-version: '17'
132109

133110
- name: Install Maven
134111
shell: bash

0 commit comments

Comments
 (0)