Skip to content

Commit

Permalink
restore output
Browse files Browse the repository at this point in the history
  • Loading branch information
eddumelendez committed Oct 30, 2021
1 parent 7e8cf67 commit 9d884d4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
9 changes: 8 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"

0 comments on commit 9d884d4

Please sign in to comment.