Skip to content

Commit eff37b2

Browse files
authored
Document input: install-as-version
Amends #34
1 parent c59dba7 commit eff37b2

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ JDKs built by Oracle are [Oracle JDK](https://www.oracle.com/java/technologies/d
66

77
## Input Overview
88

9-
| Input Name | Default Value | Description |
10-
|------------|--------------:|-----------------------------------------------------------------|
11-
| `website` | `oracle.com` | From where the JDK should be downloaded from. |
12-
| `release` | `18` | Java feature release number or name of an Early-Access project. |
13-
| `version` | `latest` | An explicit version of a Java release. |
14-
| `install` | `true` | Install the downloaded JDK archive file. |
15-
| `uri` | _empty_ | Custom URI of a JDK archive file to download. |
9+
| Input Name | Default Value | Description |
10+
|-----------------------|--------------:|-----------------------------------------------------------------|
11+
| `website` | `oracle.com` | From where the JDK should be downloaded from. |
12+
| `release` | `18` | Java feature release number or name of an Early-Access project. |
13+
| `version` | `latest` | An explicit version of a Java release. |
14+
| `install` | `true` | Install the downloaded JDK archive file. |
15+
| `install-as-version` | _empty_ | Control the value passed as `java-version` |
16+
| `uri` | _empty_ | Custom URI of a JDK archive file to download. |
1617

1718
### Input `website`
1819

@@ -64,6 +65,19 @@ It is enabled by default by using `true` as its value.
6465
This action delegates to [`actions/setup-java`](https://github.com/actions/setup-java) in order to install the downloaded JDK archive file using default
6566
Pass `false` to skip the automatic JDK installation and invoke `actions/setup-java` with your custom settings.
6667

68+
### Input `install-as-version`
69+
70+
The `install-as-version` input allows overriding the value passed as `java-version` to the underlying `actions/setup-java` action.
71+
72+
Supported values of `install-as-version` include:
73+
- `PARSE_URI` parses the computed or given URI for a valid Java version string, ex. `17.0.1`.
74+
- `HASH_URI` returns the `hashCode()` of the computed or given URI as a string, ex. `12345`.
75+
- All strings [supported by `actions/setup-java`](https://github.com/actions/setup-java#supported-version-syntax)
76+
77+
The default value of `install-as-version` depends on the `release` input documented above:
78+
- If `release` input starts with a digit, `install-as-version` defaults to `PARSE_URI`.
79+
- If `release` input does not start with a digit, `install-as-version` defaults to `HASH_URI`.
80+
6781
### Input `uri`
6882

6983
Use the `uri` input to download a JDK from the specified URI originating from a supported website.

0 commit comments

Comments
 (0)