setup-java does not set GRAALVM_HOME #1139
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description:
When setup-java installs graalvm-community it does not set GRAALVM_HOME. People like me who are migrating from graalvm/setup-graalvm@v1 will have builds that expect this env variable to be set.
I believe the same issue will be present for Oracle GraalVM, but I have not verified.
Task version:
v5.6.0
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Repro steps:
Tun a build that requires GRAALVM_HOME to be set.
Expected behavior:
The build to succeed, the same as it did when using graalvm/setup-graalvm@v1.
Actual behavior:
The build fails (in my case by an invalid path to the native-image binary because my build is using GRAALVM_HOME to find it.)
Workaround:
Use:
- name: Set up Java (GraalVM)
uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java-version }}
cache: 'gradle'
# `actions/setup-java` doesn't set `GRAALVM_HOME` so we'll do it explicitly.
- name: Set GRAALVM_HOME
run: echo "GRAALVM_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
msgilligan commentedon Jul 20, 2026
I was on the fence between sending this as a bug or a feature request, but I found the bug template to be a better way of describing the issue -- the Action did not have the expected behavior.
v-mahabaleshwars commentedon Jul 21, 2026
Hi @msgilligan,
Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates.