Skip to content

Commit

Permalink
CI: fix install tidb as root. (#5490)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoucheng361 authored Jan 1, 2025
1 parent beaa0d0 commit 8fc8cb9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/scripts/start_meta_engine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,19 @@ install_tikv(){
}

install_tidb(){
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
user=$(whoami)
if [ "$user" == "root" ]; then
echo user is $user
if [[ "$user" == "root" ]]; then
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sudo sh
tiup=/root/.tiup/bin/tiup
elif [ "$user" == "runner" ]; then
elif [[ "$user" == "runner" ]]; then
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
tiup=/home/runner/.tiup/bin/tiup
else
echo "Unknown user $user"
exit 1
fi
echo tiup is $tiup

$tiup playground 5.4.0 > tidb.log 2>&1 &
pid=$!
Expand Down

0 comments on commit 8fc8cb9

Please sign in to comment.