Skip to content

Commit df8d123

Browse files
committed
Improve self-hosted detection
1 parent d371420 commit df8d123

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/unix.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ read_env() {
5353
[ "${debug:-${DEBUG:-false}}" = "true" ] && debug=debug && update=true || debug=release
5454
[[ "${phpts:-${PHPTS:-nts}}" = "ts" || "${phpts:-${PHPTS:-nts}}" = "zts" ]] && ts=zts && update=true || ts=nts
5555
fail_fast="${fail_fast:-${FAIL_FAST:-false}}"
56-
[[ -z "${ImageOS}" && -z "${ImageVersion}" || -n ${ACT} ]] && _runner=self-hosted || _runner=github
56+
[[ ( -z "$ImageOS" && -z "$ImageVersion" ) ||
57+
( -n "$RUNNER_ENVIRONMENT" && "$RUNNER_ENVIRONMENT" = "self-hosted" ) ||
58+
-n "$ACT" || -n "$CONTAINER" ]] && _runner=self-hosted || _runner=github
5759
runner="${runner:-${RUNNER:-$_runner}}"
5860
tool_path_dir="${setup_php_tools_dir:-${SETUP_PHP_TOOLS_DIR:-/usr/local/bin}}"
5961

0 commit comments

Comments
 (0)