diff --git a/.github/workflows/start-mysql.sh b/.github/workflows/start-mysql.sh index adbdd308..6ae16fc0 100755 --- a/.github/workflows/start-mysql.sh +++ b/.github/workflows/start-mysql.sh @@ -3,18 +3,25 @@ set -xe DOCKER_COMPOSE_VERSION=v2.2.3 -sudo apt-get update -sudo apt-get install -y netcat-openbsd make gcc +# sudo apt-get update +# sudo apt-get install -y netcat-openbsd make gcc -sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -sudo chmod +x /usr/local/bin/docker-compose +# sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` +# sudo chmod +x /usr/local/bin/docker-compose + +cmd=if ! type "$docker-compose" > /dev/null; then + "docker-compose" +else + "podman-compose" +fi if [ "$MYSQL_VERSION" == "8.0" ]; then - docker-compose -f docker-compose_8.0.yml up -d mysql-1 mysql-2 + $cmd -f docker-compose_8.0.yml up -d mysql-1 mysql-2 else - docker-compose up -d mysql-1 mysql-2 + $cmd up -d mysql-1 mysql-2 fi + MAX_ATTEMPTS=60 function wait_for_version () {