From 8ac768a2cf19f67eca504b90b3c67a8c2af80359 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Thu, 7 Jul 2022 06:44:16 +0200 Subject: [PATCH 1/4] Add "Install multiple JDKs" README section --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 9dcd0fad..09706019 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,30 @@ jobs: - run: java -cp java HelloWorldApp ``` +### Install multiple JDKs +```yaml +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: echo "JAVA_8=$JAVA_HOME" >> $GITHUB_ENV + + - uses: actions/setup-java@v1 + with: + java-version: 11 + - run: echo "JAVA_11=$JAVA_HOME" >> $GITHUB_ENV + + - uses: actions/setup-java@v1 + with: + java-version: 15 + - run: echo "JAVA_15=$JAVA_HOME" >> $GITHUB_ENV +``` + ### Advanced - [Selecting a Java distribution](docs/advanced-usage.md#Selecting-a-Java-distribution) - [Eclipse Temurin](docs/advanced-usage.md#Eclipse-Temurin) From 66a84830d921f6aca569d89cf7931452de84a3de Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Thu, 7 Jul 2022 09:11:25 +0200 Subject: [PATCH 2/4] Remove unessary steps from the step --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 09706019..91b2e082 100644 --- a/README.md +++ b/README.md @@ -156,12 +156,7 @@ jobs: ### Install multiple JDKs ```yaml -jobs: - build: - runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v1 with: java-version: 8 From 3c69e1510165c5aacae5625826cdf51001fe2723 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Thu, 14 Jul 2022 09:22:10 +0200 Subject: [PATCH 3/4] use @v3 version --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 91b2e082..39d7145e 100644 --- a/README.md +++ b/README.md @@ -157,17 +157,17 @@ jobs: ### Install multiple JDKs ```yaml steps: - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 with: java-version: 8 - run: echo "JAVA_8=$JAVA_HOME" >> $GITHUB_ENV - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 with: java-version: 11 - run: echo "JAVA_11=$JAVA_HOME" >> $GITHUB_ENV - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 with: java-version: 15 - run: echo "JAVA_15=$JAVA_HOME" >> $GITHUB_ENV From c69efbe773f3f96a23b1f52cfc5646b7bf4c47de Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Fri, 15 Jul 2022 09:14:25 +0200 Subject: [PATCH 4/4] Add distribution input --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 39d7145e..a160ff9c 100644 --- a/README.md +++ b/README.md @@ -159,16 +159,19 @@ jobs: steps: - uses: actions/setup-java@v3 with: + distribution: '' java-version: 8 - run: echo "JAVA_8=$JAVA_HOME" >> $GITHUB_ENV - uses: actions/setup-java@v3 with: + distribution: '' java-version: 11 - run: echo "JAVA_11=$JAVA_HOME" >> $GITHUB_ENV - uses: actions/setup-java@v3 with: + distribution: '' java-version: 15 - run: echo "JAVA_15=$JAVA_HOME" >> $GITHUB_ENV ```