Add support for http url in jdkFile

Closes #232
This commit is contained in:
Michal Dvorak 2022-01-17 16:00:38 +01:00 committed by Michal Dvořák
parent f69f00b5e5
commit ebc13aa0aa
No known key found for this signature in database
GPG key ID: 42E7AE26FA8092D2
8 changed files with 2186 additions and 2136 deletions

View file

@ -121,3 +121,39 @@ jobs:
- name: Verify Java version
run: bash __tests__/verify-java.sh "11.0.12" "${{ steps.setup-java.outputs.path }}"
shell: bash
setup-java-remote-file-temurin:
name: Validate download from remote file Eclipse Temurin
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Eclipse Temurin file
run: |
if ($IsLinux) {
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.12_7.tar.gz"
$localFilename = "java_package.tar.gz"
} elseif ($IsMacOS) {
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_mac_hotspot_11.0.12_7.tar.gz"
$localFilename = "java_package.tar.gz"
} elseif ($IsWindows) {
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_windows_hotspot_11.0.12_7.zip"
$localFilename = "java_package.zip"
}
echo "DownloadUrl=$downloadUrl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- name: setup-java
uses: ./
id: setup-java
with:
distribution: 'jdkfile'
jdkFile: ${{ env.DownloadUrl }}
java-version: '11.0.0-ea'
architecture: x64
- name: Verify Java version
run: bash __tests__/verify-java.sh "11.0.12" "${{ steps.setup-java.outputs.path }}"
shell: bash