From ca536ebfcc0da25734c48c0c81c4c9ae5eb5a122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Sat, 30 Oct 2021 12:22:22 -0500 Subject: [PATCH 01/29] Rework sdkman-action --- .github/workflows/workflow.yml | 5 ---- README.md | 11 --------- action.yml | 42 ++-------------------------------- 3 files changed, 2 insertions(+), 56 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4f93ef8..ec677ae 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,10 +19,5 @@ jobs: with: candidate: java version: ${{ matrix.version }} - - uses: actions/setup-java@v1 - id: setup-java - with: - java-version: 15 - jdkFile: ${{ steps.sdkman.outputs.file }} - name: Verify Java ${{ matrix.version }} run: java --version diff --git a/README.md b/README.md index f9e90ad..fec9504 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,6 @@ This action installs any `candidate` via [sdkman](https://sdkman.io/). **Required** The version of the candidate to install. -## Outputs - -### `file` - -Filename of the downloaded archive. - ## Example usage ```yaml @@ -26,10 +20,5 @@ Filename of the downloaded archive. with: candidate: java version: 15.0.0-amzn -- uses: actions/setup-java@v1 - id: setup-java - with: - java-version: 15.0.0 - jdkFile: ${{ steps.sdkman.outputs.file }} - run: java --version ``` diff --git a/action.yml b/action.yml index d92db91..06bc8a8 100644 --- a/action.yml +++ b/action.yml @@ -8,10 +8,6 @@ inputs: version: description: 'The version of the candidate to install' required: true -outputs: - file: - description: 'Filename of the downloaded archive.' - value: ${{ steps.sdkman.outputs.file }} runs: using: 'composite' steps: @@ -20,40 +16,6 @@ runs: run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} - platform=$(uname) - base_name="${candidate}-${version}" - - function __sdkman_echo_debug() { - if [[ "$sdkman_debug_mode" == 'true' ]]; then - echo "$1" - fi - } - - function __sdkman_echo() { - if [[ "$sdkman_colour_enable" == 'false' ]]; then - echo -e "$2" - else - echo -e "\033[1;$1$2\033[0m" - fi - } - - function __sdkman_echo_green() { - __sdkman_echo "32m" "$1" - } - - if [ $RUNNER_OS == 'Linux' ] || [ $RUNNER_OS == 'macOS' ]; then - binary_input="/tmp/${base_name}.bin" - zip_output="/tmp/${base_name}.zip" - - curl -L -o $binary_input https://api.sdkman.io/2/broker/download/$candidate/$version/$platform - post_installation_hook=hook_post_${candidate}_${version}.sh - curl -o "$post_installation_hook" https://api.sdkman.io/2/hooks/post/$candidate/$version/$platform - source $post_installation_hook - __sdkman_post_installation_hook - else - zip_output="$base_name.zip" - curl -L -o $zip_output https://api.sdkman.io/2/broker/download/$candidate/$version/$platform - fi - - echo "::set-output name=file::$zip_output" + export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io" | bash + source $HOME/.sdkman/bin/sdkman-init.sh && sdk install candidate version && sdk flush archives && sdk flush From 4d4c8988b433af461fbe3475f8ef271e6b1e322f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Sat, 30 Oct 2021 12:25:02 -0500 Subject: [PATCH 02/29] Fix script --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 06bc8a8..4e89b91 100644 --- a/action.yml +++ b/action.yml @@ -18,4 +18,4 @@ runs: version=${{ inputs.version }} export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io" | bash - source $HOME/.sdkman/bin/sdkman-init.sh && sdk install candidate version && sdk flush archives && sdk flush + source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version && sdk flush archives && sdk flush From d295f0ecc7b1ed9af5870858d1ba5171c7a8c6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Sat, 30 Oct 2021 12:27:44 -0500 Subject: [PATCH 03/29] Skip shell config update --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 4e89b91..ba4e969 100644 --- a/action.yml +++ b/action.yml @@ -17,5 +17,5 @@ runs: candidate=${{ inputs.candidate }} version=${{ inputs.version }} - export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io" | bash + export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version && sdk flush archives && sdk flush From 9a5d99d60f3637c023730f0fa57fbcb66dbe9223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Sat, 30 Oct 2021 12:33:17 -0500 Subject: [PATCH 04/29] Fix java -version command --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index ec677ae..fb6e4de 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -20,4 +20,4 @@ jobs: candidate: java version: ${{ matrix.version }} - name: Verify Java ${{ matrix.version }} - run: java --version + run: java -version From 7e8cf67c9f3bc1bd73d4bb4b5368e983521679dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Sat, 30 Oct 2021 12:37:45 -0500 Subject: [PATCH 05/29] Update matrix java versions --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index fb6e4de..58b4e67 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - version: [ 15.0.1.hs-adpt, 15.0.1.j9-adpt, 15.0.1-amzn, 15.0.1-zulu, 15.0.1.fx-zulu, 15.0.1.fx-librca, 15.0.1-librca, 15.0.1-open, 15.0.1-sapmchn ] + version: [ 17.0.0.35.2-amzn, 21.3.0.r17-grl, 17-open, 17.0.0.fx-librca, 17.0.0-librca, 17.0.0-ms, 17.0.0-oracle, 17-sapmchn, 17.0.0-tem, 17.0.0-zulu, 17.0.0.fx-zulu ] runs-on: ${{ matrix.os }} steps: - name: Checkout From 9d884d4a181020c24784db3276e42cb509c3a0c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Sat, 30 Oct 2021 12:59:56 -0500 Subject: [PATCH 06/29] restore output --- .github/workflows/workflow.yml | 7 ++++++- README.md | 11 +++++++++++ action.yml | 9 ++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 58b4e67..7cdf8b5 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - version: [ 17.0.0.35.2-amzn, 21.3.0.r17-grl, 17-open, 17.0.0.fx-librca, 17.0.0-librca, 17.0.0-ms, 17.0.0-oracle, 17-sapmchn, 17.0.0-tem, 17.0.0-zulu, 17.0.0.fx-zulu ] + version: [ 17.0.0.35.1-amzn, 21.3.0.r17-grl, 17-open, 17.0.0.fx-librca, 17.0.0-librca, 17.0.0-ms, 17.0.0-oracle, 17-sapmchn, 17.0.0-tem, 17.0.0-zulu, 17.0.0.fx-zulu ] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -19,5 +19,10 @@ jobs: with: candidate: java version: ${{ matrix.version }} + - uses: actions/setup-java@v1 + id: setup-java + with: + java-version: 15 + jdkFile: ${{ steps.sdkman.outputs.file }} - name: Verify Java ${{ matrix.version }} run: java -version diff --git a/README.md b/README.md index fec9504..f9e90ad 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ This action installs any `candidate` via [sdkman](https://sdkman.io/). **Required** The version of the candidate to install. +## Outputs + +### `file` + +Filename of the downloaded archive. + ## Example usage ```yaml @@ -20,5 +26,10 @@ This action installs any `candidate` via [sdkman](https://sdkman.io/). with: candidate: java version: 15.0.0-amzn +- uses: actions/setup-java@v1 + id: setup-java + with: + java-version: 15.0.0 + jdkFile: ${{ steps.sdkman.outputs.file }} - run: java --version ``` diff --git a/action.yml b/action.yml index ba4e969..a7babde 100644 --- a/action.yml +++ b/action.yml @@ -8,6 +8,10 @@ inputs: version: description: 'The version of the candidate to install' required: true +outputs: + file: + description: 'Filename of the downloaded archive.' + value: ${{ steps.sdkman.outputs.file }} runs: using: 'composite' steps: @@ -18,4 +22,7 @@ runs: version=${{ inputs.version }} export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash - source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version && sdk flush archives && sdk flush + source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version + + zip_output=$HOME/.sdkman/archives/$candidate-$version.zip + echo "::set-output name=file::$zip_output" From 9d4095cf53d9b78e939b206f967a6b273254f802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 01:20:57 -0600 Subject: [PATCH 07/29] Test --- .github/workflows/workflow.yml | 5 ----- action.yml | 9 +++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 7cdf8b5..b653db6 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,10 +19,5 @@ jobs: with: candidate: java version: ${{ matrix.version }} - - uses: actions/setup-java@v1 - id: setup-java - with: - java-version: 15 - jdkFile: ${{ steps.sdkman.outputs.file }} - name: Verify Java ${{ matrix.version }} run: java -version diff --git a/action.yml b/action.yml index 54bdcde..91e5286 100644 --- a/action.yml +++ b/action.yml @@ -8,10 +8,6 @@ inputs: version: description: 'The version of the candidate to install' required: true -outputs: - file: - description: 'Filename of the downloaded archive.' - value: ${{ steps.sdkman.outputs.file }} runs: using: 'composite' steps: @@ -24,5 +20,6 @@ runs: export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version - zip_output=$HOME/.sdkman/archives/$candidate-$version.zip - echo "file=$zip_output" >> $GITHUB_OUTPUT + for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do + echo "$child_dir/current/bin" >> $GITHUB_PATH + done From 3e28b3f3da098f928b1074fe76717f90923f5ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 01:40:25 -0600 Subject: [PATCH 08/29] Allow to run sdk env intall --- action.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 91e5286..bd0cb7f 100644 --- a/action.yml +++ b/action.yml @@ -4,15 +4,16 @@ description: 'Download the sdk you want to install' inputs: candidate: description: 'The name of the candidate to install' - required: true + required: false version: description: 'The version of the candidate to install' - required: true + required: false runs: using: 'composite' steps: - - id: sdkman + - id: Install candidate shell: bash + if: ${{ inputs.candidate != '' && inputs.version != '' }} run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} @@ -20,6 +21,16 @@ runs: export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version + for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do + echo "$child_dir/current/bin" >> $GITHUB_PATH + done + - id: Install using .sdkmanrc + shell: bash + if: ${{ inputs.candidate == '' && inputs.version == '' }} + run: | + export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash + source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install + for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do echo "$child_dir/current/bin" >> $GITHUB_PATH done From 54693bf9cf9be71ab0e21cad4a15bbe089ec9abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 01:58:16 -0600 Subject: [PATCH 09/29] Restore windows --- action.yml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index bd0cb7f..acbc06d 100644 --- a/action.yml +++ b/action.yml @@ -8,12 +8,16 @@ inputs: version: description: 'The version of the candidate to install' required: false +outputs: + file: + description: 'Filename of the downloaded archive.' + value: ${{ steps.sdkman.outputs.file }} runs: using: 'composite' steps: - - id: Install candidate + - id: Install candidate in Linux or macOS shell: bash - if: ${{ inputs.candidate != '' && inputs.version != '' }} + if: ${{ $RUNNER_OS == 'Linux' || $RUNNER_OS == 'macOS' }} && ${{ inputs.candidate != '' && inputs.version != '' }} run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} @@ -24,9 +28,28 @@ runs: for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do echo "$child_dir/current/bin" >> $GITHUB_PATH done + + echo "file=" >> $GITHUB_OUTPUT + - id: Install candidate in Windows + shell: bash + if: ${{ $RUNNER_OS == 'Windows' && inputs.candidate != '' && inputs.version != '' }} + run: | + candidate=${{ inputs.candidate }} + version=${{ inputs.version }} + platform=$(uname) + base_name="${candidate}-${version}" + + zip_output="$base_name.zip" + curl -L -o $zip_output https://api.sdkman.io/2/broker/download/$candidate/$version/$platform + + for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do + echo "$child_dir/current/bin" >> $GITHUB_PATH + done + + echo "file=$zip_output" >> $GITHUB_OUTPUT - id: Install using .sdkmanrc shell: bash - if: ${{ inputs.candidate == '' && inputs.version == '' }} + if: ${{ $RUNNER_OS == 'Linux' || $RUNNER_OS == 'macOS' }} && ${{ inputs.candidate == '' && inputs.version == '' }} run: | export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install @@ -34,3 +57,5 @@ runs: for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do echo "$child_dir/current/bin" >> $GITHUB_PATH done + + echo "file=" >> $GITHUB_OUTPUT From c1577aed5dca2c0de048321fc3e3161212c17fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:01:22 -0600 Subject: [PATCH 10/29] Fix --- .github/workflows/workflow.yml | 7 +++++++ action.yml | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b653db6..4aad38b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -16,8 +16,15 @@ jobs: - name: Setup Java ${{ matrix.version }} id: sdkman uses: ./ + if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }} with: candidate: java version: ${{ matrix.version }} + - uses: actions/setup-java@v1 + if: ${{ matrix.os == 'windows-latest' }} + id: setup-java + with: + java-version: 17 + jdkFile: ${{ steps.sdkman.outputs.file }} - name: Verify Java ${{ matrix.version }} run: java -version diff --git a/action.yml b/action.yml index acbc06d..3450791 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,7 @@ outputs: runs: using: 'composite' steps: - - id: Install candidate in Linux or macOS + - id: install-candidate-in-linux-or-macos shell: bash if: ${{ $RUNNER_OS == 'Linux' || $RUNNER_OS == 'macOS' }} && ${{ inputs.candidate != '' && inputs.version != '' }} run: | @@ -30,7 +30,7 @@ runs: done echo "file=" >> $GITHUB_OUTPUT - - id: Install candidate in Windows + - id: install-candidate-in-windows shell: bash if: ${{ $RUNNER_OS == 'Windows' && inputs.candidate != '' && inputs.version != '' }} run: | @@ -47,7 +47,7 @@ runs: done echo "file=$zip_output" >> $GITHUB_OUTPUT - - id: Install using .sdkmanrc + - id: install-candidate-in-sdkmanrc shell: bash if: ${{ $RUNNER_OS == 'Linux' || $RUNNER_OS == 'macOS' }} && ${{ inputs.candidate == '' && inputs.version == '' }} run: | From c9d89b75916e8ce7c0c00266bc9b669a4362fb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:03:07 -0600 Subject: [PATCH 11/29] Fix --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 3450791..3fdaf88 100644 --- a/action.yml +++ b/action.yml @@ -17,7 +17,7 @@ runs: steps: - id: install-candidate-in-linux-or-macos shell: bash - if: ${{ $RUNNER_OS == 'Linux' || $RUNNER_OS == 'macOS' }} && ${{ inputs.candidate != '' && inputs.version != '' }} + if: ${{ RUNNER_OS == 'Linux' || RUNNER_OS == 'macOS' }} && ${{ inputs.candidate != '' && inputs.version != '' }} run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} @@ -32,7 +32,7 @@ runs: echo "file=" >> $GITHUB_OUTPUT - id: install-candidate-in-windows shell: bash - if: ${{ $RUNNER_OS == 'Windows' && inputs.candidate != '' && inputs.version != '' }} + if: ${{ RUNNER_OS == 'Windows' && inputs.candidate != '' && inputs.version != '' }} run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} @@ -49,7 +49,7 @@ runs: echo "file=$zip_output" >> $GITHUB_OUTPUT - id: install-candidate-in-sdkmanrc shell: bash - if: ${{ $RUNNER_OS == 'Linux' || $RUNNER_OS == 'macOS' }} && ${{ inputs.candidate == '' && inputs.version == '' }} + if: ${{ RUNNER_OS == 'Linux' || RUNNER_OS == 'macOS' }} && ${{ inputs.candidate == '' && inputs.version == '' }} run: | export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install From 046d408711dcbf058f78d0685e70039546e957c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:09:18 -0600 Subject: [PATCH 12/29] Use env for linux and mac --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3fdaf88..f2eda58 100644 --- a/action.yml +++ b/action.yml @@ -17,7 +17,7 @@ runs: steps: - id: install-candidate-in-linux-or-macos shell: bash - if: ${{ RUNNER_OS == 'Linux' || RUNNER_OS == 'macOS' }} && ${{ inputs.candidate != '' && inputs.version != '' }} + if: ${{ env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' }} && ${{ inputs.candidate != '' && inputs.version != '' }} run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} @@ -49,7 +49,7 @@ runs: echo "file=$zip_output" >> $GITHUB_OUTPUT - id: install-candidate-in-sdkmanrc shell: bash - if: ${{ RUNNER_OS == 'Linux' || RUNNER_OS == 'macOS' }} && ${{ inputs.candidate == '' && inputs.version == '' }} + if: ${{ env.UNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' }} && ${{ inputs.candidate == '' && inputs.version == '' }} run: | export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install From c35ee302b1105196b5629eb6c86994bbd7c43d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:11:08 -0600 Subject: [PATCH 13/29] Fix --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index f2eda58..67465c9 100644 --- a/action.yml +++ b/action.yml @@ -17,7 +17,7 @@ runs: steps: - id: install-candidate-in-linux-or-macos shell: bash - if: ${{ env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' }} && ${{ inputs.candidate != '' && inputs.version != '' }} + if: env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' && ${{ inputs.candidate != '' && inputs.version != '' }} run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} @@ -49,7 +49,7 @@ runs: echo "file=$zip_output" >> $GITHUB_OUTPUT - id: install-candidate-in-sdkmanrc shell: bash - if: ${{ env.UNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' }} && ${{ inputs.candidate == '' && inputs.version == '' }} + if: env.UNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' && ${{ inputs.candidate == '' && inputs.version == '' }} run: | export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install From f66959b1612dc7b2f169d66aaa063924711eb702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:12:26 -0600 Subject: [PATCH 14/29] Fix --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 67465c9..0cbdd90 100644 --- a/action.yml +++ b/action.yml @@ -32,7 +32,7 @@ runs: echo "file=" >> $GITHUB_OUTPUT - id: install-candidate-in-windows shell: bash - if: ${{ RUNNER_OS == 'Windows' && inputs.candidate != '' && inputs.version != '' }} + if: env.RUNNER_OS == 'Windows' && ${{ inputs.candidate != '' && inputs.version != '' }} run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} From 6a6305f52d71fdbaeb4bc088497b679aa80a0b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:18:56 -0600 Subject: [PATCH 15/29] Fix --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 0cbdd90..f517a62 100644 --- a/action.yml +++ b/action.yml @@ -17,7 +17,7 @@ runs: steps: - id: install-candidate-in-linux-or-macos shell: bash - if: env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' && ${{ inputs.candidate != '' && inputs.version != '' }} + if: ${{ inputs.candidate != '' && inputs.version != '' }} && env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' run: | candidate=${{ inputs.candidate }} version=${{ inputs.version }} @@ -49,7 +49,7 @@ runs: echo "file=$zip_output" >> $GITHUB_OUTPUT - id: install-candidate-in-sdkmanrc shell: bash - if: env.UNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' && ${{ inputs.candidate == '' && inputs.version == '' }} + if: ${{ inputs.candidate == '' && inputs.version == '' }} && env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' run: | export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install From 59d94ff7f2c87baa52f508f6f3be1259c4d528fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:32:48 -0600 Subject: [PATCH 16/29] Fix --- action.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/action.yml b/action.yml index f517a62..0303645 100644 --- a/action.yml +++ b/action.yml @@ -15,6 +15,18 @@ outputs: runs: using: 'composite' steps: + - id: install-candidate-in-sdkmanrc + shell: bash + if: ${{ inputs.candidate == '' && inputs.version == '' }} && env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' + run: | + export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash + source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install + + for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do + echo "$child_dir/current/bin" >> $GITHUB_PATH + done + + echo "file=" >> $GITHUB_OUTPUT - id: install-candidate-in-linux-or-macos shell: bash if: ${{ inputs.candidate != '' && inputs.version != '' }} && env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' @@ -47,15 +59,3 @@ runs: done echo "file=$zip_output" >> $GITHUB_OUTPUT - - id: install-candidate-in-sdkmanrc - shell: bash - if: ${{ inputs.candidate == '' && inputs.version == '' }} && env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' - run: | - export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash - source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install - - for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do - echo "$child_dir/current/bin" >> $GITHUB_PATH - done - - echo "file=" >> $GITHUB_OUTPUT From 1b4a9d4bd2b73e6af4df206225498cf3f28fe3fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:36:46 -0600 Subject: [PATCH 17/29] Fix --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 0303645..f195090 100644 --- a/action.yml +++ b/action.yml @@ -5,9 +5,11 @@ inputs: candidate: description: 'The name of the candidate to install' required: false + default: '' version: description: 'The version of the candidate to install' required: false + default: '' outputs: file: description: 'Filename of the downloaded archive.' From 93d76410b21805d6ea4f4059a47fd4ac41799fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:41:01 -0600 Subject: [PATCH 18/29] Fix --- action.yml | 70 ++++++++++++++++++++---------------------------------- 1 file changed, 26 insertions(+), 44 deletions(-) diff --git a/action.yml b/action.yml index f195090..b8d884c 100644 --- a/action.yml +++ b/action.yml @@ -5,11 +5,9 @@ inputs: candidate: description: 'The name of the candidate to install' required: false - default: '' version: description: 'The version of the candidate to install' required: false - default: '' outputs: file: description: 'Filename of the downloaded archive.' @@ -17,47 +15,31 @@ outputs: runs: using: 'composite' steps: - - id: install-candidate-in-sdkmanrc + - id: sdkman shell: bash - if: ${{ inputs.candidate == '' && inputs.version == '' }} && env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' run: | - export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash - source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install - - for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do - echo "$child_dir/current/bin" >> $GITHUB_PATH - done - - echo "file=" >> $GITHUB_OUTPUT - - id: install-candidate-in-linux-or-macos - shell: bash - if: ${{ inputs.candidate != '' && inputs.version != '' }} && env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' - run: | - candidate=${{ inputs.candidate }} - version=${{ inputs.version }} - - export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash - source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version - - for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do - echo "$child_dir/current/bin" >> $GITHUB_PATH - done - - echo "file=" >> $GITHUB_OUTPUT - - id: install-candidate-in-windows - shell: bash - if: env.RUNNER_OS == 'Windows' && ${{ inputs.candidate != '' && inputs.version != '' }} - run: | - candidate=${{ inputs.candidate }} - version=${{ inputs.version }} - platform=$(uname) - base_name="${candidate}-${version}" - - zip_output="$base_name.zip" - curl -L -o $zip_output https://api.sdkman.io/2/broker/download/$candidate/$version/$platform - - for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do - echo "$child_dir/current/bin" >> $GITHUB_PATH - done - - echo "file=$zip_output" >> $GITHUB_OUTPUT + if [ env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' ]; then + export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash + if [ inputs.candidate == '' && inputs.version == '' ]; then + source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install + else + candidate=${{ inputs.candidate }} + version=${{ inputs.version }} + source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version + fi + echo "file=" >> $GITHUB_OUTPUT + else + candidate=${{ inputs.candidate }} + version=${{ inputs.version }} + platform=$(uname) + base_name="${candidate}-${version}" + + zip_output="$base_name.zip" + curl -L -o $zip_output https://api.sdkman.io/2/broker/download/$candidate/$version/$platform + + for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do + echo "$child_dir/current/bin" >> $GITHUB_PATH + done + + echo "file=$zip_output" >> $GITHUB_OUTPUT + fi From 44607992fa9e1816923964eb6e294e8e3f0b6e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:49:38 -0600 Subject: [PATCH 19/29] Fix docs --- README.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f9e90ad..f9d1925 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,17 @@ # SDKMAN! action -This action installs any `candidate` via [sdkman](https://sdkman.io/). +This action installs any `candidate` via [sdkman](https://sdkman.io/). If inputs are provided then the +`sdk install ` command will be executed. Otherwise, the `sdk env install` command will be executed. ## Inputs ### `candidate` -**Required** The name of the candidate to install. +**Optional** The name of the candidate to install. ### `version` -**Required** The version of the candidate to install. +**Optional** The version of the candidate to install. ## Outputs @@ -20,6 +21,8 @@ Filename of the downloaded archive. ## Example usage +Install a specific candidate in using Windows runner: + ```yaml - uses: sdkman/sdkman-action@master id: sdkman @@ -33,3 +36,22 @@ Filename of the downloaded archive. jdkFile: ${{ steps.sdkman.outputs.file }} - run: java --version ``` + +Install a specific candidate in Linux or macOS runner: + +```yaml +- uses: sdkman/sdkman-action@master + id: sdkman + with: + candidate: java + version: 15.0.0-amzn +- run: java --version +``` + +Install candidates from `.sdkmanrc` in Linux or macOS runner: + +```yaml +- uses: sdkman/sdkman-action@master + id: sdkman +- run: java --version +``` From a825e4b0f4d6797e2b0641f06d1385096149fea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:52:57 -0600 Subject: [PATCH 20/29] Add workflow test for sdkmanrc file --- .github/workflows/sdkmanrc-test.yml | 19 +++++++++++++++++++ .sdkmanrc | 1 + 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/sdkmanrc-test.yml create mode 100644 .sdkmanrc diff --git a/.github/workflows/sdkmanrc-test.yml b/.github/workflows/sdkmanrc-test.yml new file mode 100644 index 0000000..371d208 --- /dev/null +++ b/.github/workflows/sdkmanrc-test.yml @@ -0,0 +1,19 @@ +name: Main workflow +on: [push, pull_request] + +jobs: + build: + name: "JDK ${{ matrix.version }} on ${{ matrix.os }}" + strategy: + fail-fast: false + matrix: + os: [ macos-latest, ubuntu-latest ] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Java ${{ matrix.version }} + id: sdkman + uses: ./ + - name: Verify Java ${{ matrix.version }} + run: java -version diff --git a/.sdkmanrc b/.sdkmanrc new file mode 100644 index 0000000..6efdcce --- /dev/null +++ b/.sdkmanrc @@ -0,0 +1 @@ +java=17.0.0-tem \ No newline at end of file From 33065ee66800303099939e48aed195bf7dd4184e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Mon, 27 Mar 2023 02:55:36 -0600 Subject: [PATCH 21/29] Fix workflow name --- .github/workflows/sdkmanrc-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sdkmanrc-test.yml b/.github/workflows/sdkmanrc-test.yml index 371d208..71ea656 100644 --- a/.github/workflows/sdkmanrc-test.yml +++ b/.github/workflows/sdkmanrc-test.yml @@ -1,4 +1,4 @@ -name: Main workflow +name: Test using .sdkmanrc on: [push, pull_request] jobs: From 36979cb27cf79f5bee85ffb14ef856d8ce35251e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Wed, 12 Apr 2023 23:55:33 -0500 Subject: [PATCH 22/29] Fix action --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index b8d884c..3ed44a0 100644 --- a/action.yml +++ b/action.yml @@ -18,9 +18,9 @@ runs: - id: sdkman shell: bash run: | - if [ env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' ]; then + if [[ env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' ]]; then export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash - if [ inputs.candidate == '' && inputs.version == '' ]; then + if [[ -z "${{ inputs.candidate }}" && -z "${{ inputs.version }}" ]]; then source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install else candidate=${{ inputs.candidate }} From 19a9da7c68b699071fe14220281715be9bb6a02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Thu, 13 Apr 2023 00:02:47 -0500 Subject: [PATCH 23/29] Update actions/setup-java@v3 --- .github/workflows/workflow.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4aad38b..eba71cd 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -20,7 +20,7 @@ jobs: with: candidate: java version: ${{ matrix.version }} - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 if: ${{ matrix.os == 'windows-latest' }} id: setup-java with: diff --git a/README.md b/README.md index f9d1925..8bbc5ed 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Install a specific candidate in using Windows runner: with: candidate: java version: 15.0.0-amzn -- uses: actions/setup-java@v1 +- uses: actions/setup-java@v3 id: setup-java with: java-version: 15.0.0 From a63501b2a9499bfa3cd710e3652b3ee65eecccb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Thu, 13 Apr 2023 00:07:13 -0500 Subject: [PATCH 24/29] Fix action --- .github/workflows/workflow.yml | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index eba71cd..137a6a3 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -24,6 +24,7 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} id: setup-java with: + distribution: 'jdkfile' java-version: 17 jdkFile: ${{ steps.sdkman.outputs.file }} - name: Verify Java ${{ matrix.version }} diff --git a/README.md b/README.md index 8bbc5ed..c1c9a15 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Install a specific candidate in using Windows runner: - uses: actions/setup-java@v3 id: setup-java with: + distribution: 'jdkfile' java-version: 15.0.0 jdkFile: ${{ steps.sdkman.outputs.file }} - run: java --version From d15fe1d5681d73963e0ce4771ac242fb51a67990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Thu, 13 Apr 2023 00:09:26 -0500 Subject: [PATCH 25/29] Fix action --- action.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 3ed44a0..ab34828 100644 --- a/action.yml +++ b/action.yml @@ -27,6 +27,9 @@ runs: version=${{ inputs.version }} source $HOME/.sdkman/bin/sdkman-init.sh && sdk install $candidate $version fi + for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do + echo "$child_dir/current/bin" >> $GITHUB_PATH + done echo "file=" >> $GITHUB_OUTPUT else candidate=${{ inputs.candidate }} @@ -36,10 +39,6 @@ runs: zip_output="$base_name.zip" curl -L -o $zip_output https://api.sdkman.io/2/broker/download/$candidate/$version/$platform - - for child_dir in $(find "$SDKMAN_DIR/candidates" -mindepth 1 -maxdepth 1 -type d); do - echo "$child_dir/current/bin" >> $GITHUB_PATH - done echo "file=$zip_output" >> $GITHUB_OUTPUT fi From 83de81fd81e121ebae7ef30a67c3deadabda9413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Thu, 13 Apr 2023 00:16:51 -0500 Subject: [PATCH 26/29] Fix action --- .github/workflows/workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 137a6a3..37348f1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -16,7 +16,6 @@ jobs: - name: Setup Java ${{ matrix.version }} id: sdkman uses: ./ - if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }} with: candidate: java version: ${{ matrix.version }} From fd4959679d04f2162da10db1812f4979ac6daf90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Thu, 13 Apr 2023 00:25:36 -0500 Subject: [PATCH 27/29] Update actions/checkout@v3 --- .github/workflows/sdkmanrc-test.yml | 2 +- .github/workflows/workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sdkmanrc-test.yml b/.github/workflows/sdkmanrc-test.yml index 71ea656..ff9ea07 100644 --- a/.github/workflows/sdkmanrc-test.yml +++ b/.github/workflows/sdkmanrc-test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Java ${{ matrix.version }} id: sdkman uses: ./ diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 37348f1..ca94160 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Java ${{ matrix.version }} id: sdkman uses: ./ From 01308305e0159d380453eb7f023e5f3154cd2152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Thu, 13 Apr 2023 00:34:16 -0500 Subject: [PATCH 28/29] fix action --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ab34828..17f9aa3 100644 --- a/action.yml +++ b/action.yml @@ -18,7 +18,7 @@ runs: - id: sdkman shell: bash run: | - if [[ env.RUNNER_OS == 'Linux' || env.RUNNER_OS == 'macOS' ]]; then + if [[ $RUNNER_OS == 'Linux' || $RUNNER_OS == 'macOS' ]]; then export SDKMAN_DIR="$HOME/.sdkman" && curl -s "https://get.sdkman.io?rcupdate=false" | bash if [[ -z "${{ inputs.candidate }}" && -z "${{ inputs.version }}" ]]; then source $HOME/.sdkman/bin/sdkman-init.sh && sdk env install From 12eb1a601bb426ba870a31a880896b875c821483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Thu, 13 Apr 2023 00:41:06 -0500 Subject: [PATCH 29/29] Fix readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c1c9a15..175af07 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Install a specific candidate in using Windows runner: distribution: 'jdkfile' java-version: 15.0.0 jdkFile: ${{ steps.sdkman.outputs.file }} -- run: java --version +- run: java -version ``` Install a specific candidate in Linux or macOS runner: @@ -46,7 +46,7 @@ Install a specific candidate in Linux or macOS runner: with: candidate: java version: 15.0.0-amzn -- run: java --version +- run: java -version ``` Install candidates from `.sdkmanrc` in Linux or macOS runner: @@ -54,5 +54,5 @@ Install candidates from `.sdkmanrc` in Linux or macOS runner: ```yaml - uses: sdkman/sdkman-action@master id: sdkman -- run: java --version +- run: java -version ```