You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add java-package parameter to action, support jre, jdk, and jdk+fx (#1)
* Add java-package parameter to action, support jre, jdk, and jdk+fx (#1)
* Update tests to use 'jdk', 'jre', and 'jdk+fx' javaPackage parameters
* Match extension only at end of line
* Update README.md
* Update workflow to use 'node-version' instead of deprecated 'version'
Copy file name to clipboardExpand all lines: README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
This action sets up a java environment for use in actions by:
8
8
9
-
- optionally downloading and caching a version of java by version and adding to PATH. Downloads from [Azul's Zulu distribution](http://static.azul.com/zulu/bin/).
9
+
- optionally downloading and caching a requested version of java by version and adding to PATH. Default downloads are populated from the [Zulu Community distribution of OpenJDK](http://static.azul.com/zulu/bin/)
10
10
- registering problem matchers for error output
11
11
12
12
# Usage
@@ -19,7 +19,8 @@ steps:
19
19
- uses: actions/checkout@latest
20
20
- uses: actions/setup-java@v1
21
21
with:
22
-
java-version: '9.0.4'// The JDK version to make available on the path. Takes a whole or semver Jdk version, or 1.x syntax (e.g. 1.8 => Jdk 8.x)
22
+
java-version: '11.0.4'// The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Jdk 8.x)
23
+
java-package: jdk // (jre, jdk, or jdk+fx) - defaults to jdk
23
24
architecture: x64 // (x64 or x86) - defaults to x64
24
25
- run: java -cp java HelloWorldApp
25
26
```
@@ -32,7 +33,7 @@ steps:
32
33
with:
33
34
java-version: '4.0.0'
34
35
architecture: x64
35
-
jdkFile: <path to jdkFile> # Optional - jdkFile to install java from. Useful for versions not supported by Azul
36
+
jdkFile: <path to jdkFile> # Optional - jdkFile to install java from. Useful for versions not found on Zulu Community CDN
36
37
- run: java -cp java HelloWorldApp
37
38
```
38
39
@@ -43,15 +44,15 @@ jobs:
43
44
runs-on: ubuntu-16.04
44
45
strategy:
45
46
matrix:
46
-
java: [ '1.6', '9.0.x', '12.0.2' ]
47
+
# test against latest update of each major Java version, as well as specific updates of LTS versions:
@@ -209,7 +226,7 @@ function getDownloadInfo(refs, version) {
209
226
}
210
227
}
211
228
if(curUrl==''){
212
-
thrownewError(`No valid download found for version ${version}. Check https://static.azul.com/zulu/bin/ for a list of valid versions or download your own jdk file and add the jdkFile argument`);
229
+
thrownewError(`No valid download found for version ${version} and package ${javaPackage}. Check https://static.azul.com/zulu/bin/ for a list of valid versions or download your own jdk file and add the jdkFile argument`);
`No valid download found for version ${version}. Check https://static.azul.com/zulu/bin/ for a list of valid versions or download your own jdk file and add the jdkFile argument`
253
+
`No valid download found for version ${version} and package ${javaPackage}. Check https://static.azul.com/zulu/bin/ for a list of valid versions or download your own jdk file and add the jdkFile argument`
0 commit comments