graalvm / setup-graalvm

GitHub Action for setting up GraalVM distributions.
https://www.graalvm.org
Universal Permissive License v1.0
195 stars 28 forks source link

Mandrel requires the 'version' option #48

Closed can-axelspringer closed 1 year ago

can-axelspringer commented 1 year ago

We are unable to use github action with mandrel. Even though version option is specified in github action, it is not picked up and throws an error.

Are we missing something here ?

image

Run graalvm/setup-graalvm@v1
  with:
    java-version: 17
    version: mandrel-latest
    distribution: mandrel
    components: native-image
    github-token: ***
    set-java-home: true
    check-for-updates: true
    native-image-musl: false
    native-image-job-reports: false
    native-image-pr-reports: false
  env:
    AWS_REGION: eu-central-1
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    GH_SSH_PRIVATE_KEY: ***
Error: Mandrel requires the 'version' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).

This following code might be the root cause: If you specify distribution and the conditional check will be true with early exit and throw an exception in matching case branch even though version is out there specified.

https://github.com/graalvm/setup-graalvm/blob/91fd4d0716bb64c2586c24e71ca0f1aec93e3839/src/main.ts#LL42C1-L43C60

fniephaus commented 1 year ago

Thanks for the report, @can-axelspringer. We are working on a fix...