From df8d123345439a28295110b98e6cdb58563d67b7 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 8 May 2025 14:38:46 +0530 Subject: [PATCH] Improve self-hosted detection --- src/scripts/unix.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/unix.sh b/src/scripts/unix.sh index 0fd69a59..62711a6d 100644 --- a/src/scripts/unix.sh +++ b/src/scripts/unix.sh @@ -53,7 +53,9 @@ read_env() { [ "${debug:-${DEBUG:-false}}" = "true" ] && debug=debug && update=true || debug=release [[ "${phpts:-${PHPTS:-nts}}" = "ts" || "${phpts:-${PHPTS:-nts}}" = "zts" ]] && ts=zts && update=true || ts=nts fail_fast="${fail_fast:-${FAIL_FAST:-false}}" - [[ -z "${ImageOS}" && -z "${ImageVersion}" || -n ${ACT} ]] && _runner=self-hosted || _runner=github + [[ ( -z "$ImageOS" && -z "$ImageVersion" ) || + ( -n "$RUNNER_ENVIRONMENT" && "$RUNNER_ENVIRONMENT" = "self-hosted" ) || + -n "$ACT" || -n "$CONTAINER" ]] && _runner=self-hosted || _runner=github runner="${runner:-${RUNNER:-$_runner}}" tool_path_dir="${setup_php_tools_dir:-${SETUP_PHP_TOOLS_DIR:-/usr/local/bin}}"