From 03b6386ce49a5dc71e7c3d300c1062445ee9f0d8 Mon Sep 17 00:00:00 2001 From: Vladimir Sitnikov Date: Mon, 27 Nov 2023 09:31:52 +0300 Subject: [PATCH] feat: support running action with ARM64 machines Try JAVA_HOME_17_ARM64 first, and fallback to JAVA_HOME_17_X86 Fixes https://github.com/oracle-actions/setup-java/issues/63 --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index abe1076..d168748 100644 --- a/action.yml +++ b/action.yml @@ -46,7 +46,10 @@ runs: id: download shell: bash run: | - JAVA=$JAVA_HOME_17_X64/bin/java + JAVA=$JAVA_HOME_17_ARM64/bin/java + if [ ! -f "$JAVA" ]; then + JAVA=$JAVA_HOME_17_X86/bin/java + fi DOWNLOAD=$GITHUB_ACTION_PATH/src/Download.java if [ ! -z "${{ inputs.uri }}" ]; then $JAVA \