diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index 045dee1..0c37eb3 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -74,6 +74,32 @@ jobs: run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash + setup-java-alpine-linux: + name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - alpine-linux - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + container: + image: alpine:latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + distribution: ['temurin', 'sapmachine'] + version: ['21', '17'] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install bash + run: apk add --no-cache bash + - name: setup-java + uses: ./ + id: setup-java + with: + java-version: ${{ matrix.version }} + distribution: ${{ matrix.distribution }} + - name: Verify Java + run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" + shell: bash + setup-java-major-minor-versions: name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} needs: setup-java-major-versions diff --git a/dist/setup/index.js b/dist/setup/index.js index 6dd09d3..bef3302 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -125618,6 +125618,11 @@ class TemurinDistribution extends base_installer_1.JavaBase { return 'mac'; case 'win32': return 'windows'; + case 'linux': + if (fs_1.default.existsSync('/etc/alpine-release')) { + return 'alpine-linux'; + } + return 'linux'; default: return process.platform; } diff --git a/src/distributions/temurin/installer.ts b/src/distributions/temurin/installer.ts index 4a1989b..2b305eb 100644 --- a/src/distributions/temurin/installer.ts +++ b/src/distributions/temurin/installer.ts @@ -173,6 +173,11 @@ export class TemurinDistribution extends JavaBase { return 'mac'; case 'win32': return 'windows'; + case 'linux': + if (fs.existsSync('/etc/alpine-release')) { + return 'alpine-linux'; + } + return 'linux'; default: return process.platform; }