fix: use docker exec for MySQL check in CI script
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 2m25s
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 2m25s
mysqladmin may not be in CI runner PATH. Use docker exec mysql mysqladmin ping instead, which works from the Gitea Actions runner. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
eef42d51ab
commit
563675f6ef
@ -10,10 +10,10 @@ REDIS_H="${REDIS_HOST:-127.0.0.1}"
|
||||
REDIS_P="${REDIS_PORT:-6379}"
|
||||
REDIS_PW="${REDIS_PASSWORD:-}"
|
||||
|
||||
# 1. Check MySQL
|
||||
# 1. Check MySQL (via docker exec since mysqladmin may not be in CI PATH)
|
||||
echo "[1/7] Checking MySQL..."
|
||||
mysqladmin ping -h "${REDIS_H}" -u root -p"${MYSQL_ROOT_PASSWORD:-root}" --silent 2>/dev/null || {
|
||||
echo "MySQL not reachable; ensure MySQL is running"
|
||||
docker exec mysql mysqladmin ping -u root -p"${MYSQL_ROOT_PASSWORD:-root}" --silent 2>/dev/null || {
|
||||
echo "MySQL not reachable via docker; ensure MySQL container is running"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user