diff --git a/README.md b/README.md index 38e2e1db..436f8005 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,9 @@ This action allows you to work with Java and Scala projects. ## Usage - - `java-version`: The Java version to set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `.java-version` file to be in the repository root. See more details in [about `.java-version` file](docs/advanced-usage.md#Java-version-file). + - `java-version`: The Java version to set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified. See more details in [about `.java-version` file](docs/advanced-usage.md#Java-version-file). + + - `java-version-file`: The path to the `.java-version` file. See more details in [about `.java-version` file](docs/advanced-usage.md#Java-version-file). - `distribution`: _(required)_ Java [distribution](#supported-distributions). diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 88ecc0c4..94fa9564 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -481,7 +481,7 @@ steps: ``` ## Java-version file -If the `java-version` input is not specified, the action will look for a `.java-version` file at the root of the repository. If the file is found, action will try to install the most suitable version. +If the `java-version-file` input is specified, the action will try to extract the version from the file and install the most suitable version. Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv). Valid entry options: ```