Skip to content

Commit

Permalink
Use add-path
Browse files Browse the repository at this point in the history
  • Loading branch information
eddumelendez committed Oct 30, 2021
1 parent 9d884d4 commit 8b3ab53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 10 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -21,8 +17,14 @@ runs:
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
export SDKMAN_DIR="$HOME/.sdkman"
curl -s "https://get.sdkman.io?rcupdate=false" | bash
source $SDKMAN_DIR/bin/sdkman-init.sh && sdk install $candidate $version
# disable command workflow processing
echo ::stop-commands::`echo -n ${{ github.token }} | sha256sum | head -c 64`
echo "::add-path::$(echo $SDKMAN_DIR/candidates/$candidate/current/bin)"
zip_output=$HOME/.sdkman/archives/$candidate-$version.zip
echo "::set-output name=file::$zip_output"
# enable workflow command processing
echo ::`echo -n ${{ github.token }} | sha256sum | head -c 64`::

0 comments on commit 8b3ab53

Please sign in to comment.