specify MySQL host port in command line

pull/255/head
Cédric Bonhomme 2019-12-16 22:27:36 +01:00
parent bc2f3c0bea
commit 2fd500a335
No known key found for this signature in database
GPG Key ID: A1CB94DE57B7A70D
1 changed files with 4 additions and 3 deletions

View File

@ -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