From 2fd500a33595fd78d19df060a2bcce69600d1f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Mon, 16 Dec 2019 22:27:36 +0100 Subject: [PATCH] specify MySQL host port in command line --- .github/workflows/php.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index e6dd2a4..a407070 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-latest env: + MYSQL_HOST_PORT: 3800 MYSQL_DATABASE: monarc_common MYSQL_ROOT_PASSWORD: password MYSQL_USER: sqlmonarcuser @@ -18,7 +19,7 @@ jobs: - name: Start MariaDB and create databases uses: getong/mariadb-action@v1.1 with: - host port: 3800 + host port: $MYSQL_HOST_PORT mysql database: $MYSQL_DATABASE # Optional, default value is "test". The specified database which will be create mysql root password: $MYSQL_ROOT_PASSWORD # Required if "mysql user" is empty, default is empty. The root superuser password mysql user: $MYSQL_USER # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too @@ -52,8 +53,8 @@ jobs: - name: Populating common database run: | - mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < db-bootstrap/monarc_structure.sql > /dev/null - mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < db-bootstrap/monarc_data.sql > /dev/null + mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -P $MYSQL_HOST_PORT $MYSQL_DATABASE < db-bootstrap/monarc_structure.sql > /dev/null + mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -P $MYSQL_HOST_PORT $MYSQL_DATABASE < db-bootstrap/monarc_data.sql > /dev/null