mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-08-11 08:04:39 +07:00
Fix tool-cache directory on self-hosted runners
This commit is contained in:
@ -212,7 +212,7 @@ get_scan_dir() {
|
|||||||
|
|
||||||
# Function to handle self-hosted runner setup.
|
# Function to handle self-hosted runner setup.
|
||||||
self_hosted_helper() {
|
self_hosted_helper() {
|
||||||
:
|
sudo mkdir -p /opt/hostedtoolcache >/dev/null 2>&1 || true
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to Setup PHP.
|
# Function to Setup PHP.
|
||||||
|
@ -20,6 +20,7 @@ self_hosted_helper() {
|
|||||||
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
||||||
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
|
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
|
||||||
fi
|
fi
|
||||||
|
sudo mkdir -p /opt/hostedtoolcache >/dev/null 2>&1 || true
|
||||||
install_packages apt-transport-https ca-certificates curl file make jq unzip autoconf automake gcc g++ gnupg
|
install_packages apt-transport-https ca-certificates curl file make jq unzip autoconf automake gcc g++ gnupg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ self_hosted_setup() {
|
|||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
self_hosted_helper >/dev/null 2>&1
|
self_hosted_helper >/dev/null 2>&1
|
||||||
add_env RUNNER_TOOL_CACHE /tmp
|
add_env RUNNER_TOOL_CACHE /opt/hostedtoolcache
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user