Skip to content

Commit

Permalink
chore: fix env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshg committed Sep 23, 2021
1 parent e08cd7b commit 35bac3b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ jobs:
- name: Print Kotlin install and compiler plugin path
run: |
java -version
echo "Plugin Path: ${{ steps.kotlin-script-exec.outputs.plugin-path }}"
echo "Kotlin Root: ${{ steps.kotlin-script-exec.outputs.kotlin-root }}"
echo "Plugin Path : ${{ steps.kotlin-script-exec.outputs.plugin-path }}"
echo "Plugin Path (Env) : $PLUGIN_PATH"
echo "Kotlin Root : ${{ steps.kotlin-script-exec.outputs.kotlin-root }}"
echo "Kotlin Root (Env) : $KOTLIN_ROOT"
- name: List all the Kotlin binaries
run: |
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ fiddling. `kts-exec` is a composite Github Action to execute the Kotlin Script (

### `plugin-path`

Local path to the kotlin `compiler-plugin`. You may also access the path via `${{ env.PLUGIN_PATH }}`.

### `kotlin-root`

The kotlin installation path. You may also access the path via `${{ env.KOTLIN_ROOT }}`.

## Usage

Expand Down
4 changes: 2 additions & 2 deletions kotlin-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ if [ -z "${plugin_path}" ]; then
echo "::set-output name=plugin-path::$plugin_file"
else
echo "::set-output name=plugin-path::$plugin_path"
echo "plugin-path=$plugin_path" >>"$GITHUB_ENV"
echo "PLUGIN_PATH=$plugin_path" >>"$GITHUB_ENV"
fi

# Set kotlin install path
if [ -z "${kotlin_root}" ]; then
echo "::set-output name=kotlin-root::UNKNOWN"
else
echo "::set-output name=kotlin-root::$kotlin_root"
echo "kotlin-root=$kotlin_root" >>"$GITHUB_ENV"
echo "KOTLIN_ROOT=$kotlin_root" >>"$GITHUB_ENV"
# echo "{path}" >> $GITHUB_PATH
fi

0 comments on commit 35bac3b

Please sign in to comment.