Skip to content

Commit 548425a

Browse files
committed
Adding wait for mariadb step.
1 parent 2464517 commit 548425a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/dotnet-core-master.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ jobs:
5151
run: cd eform-client && yarn install
5252
- name: Create errorShots directory
5353
run: mkdir eform-client/errorShots
54+
- name: Wait for MariaDB
55+
run: |
56+
for i in {1..30}; do
57+
if docker exec mariadb-test mysql -uroot -psecretpassword -e "SELECT 1" &>/dev/null; then
58+
echo "MariaDB is ready!"
59+
break
60+
fi
61+
echo "Waiting for MariaDB... ($i/30)"
62+
sleep 2
63+
done
5464
- name: Start the newly build Docker container
5565
id: docker-run
5666
run: docker run --name my-container -p 4200:5000 --network data microtingas/frontend-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &

.github/workflows/dotnet-core-pr.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ jobs:
5252
if: steps.cache.outputs.cache-hit != 'true'
5353
- name: Create errorShots directory
5454
run: mkdir eform-client/errorShots
55+
- name: Wait for MariaDB
56+
run: |
57+
for i in {1..30}; do
58+
if docker exec mariadb-test mysql -uroot -psecretpassword -e "SELECT 1" &>/dev/null; then
59+
echo "MariaDB is ready!"
60+
break
61+
fi
62+
echo "Waiting for MariaDB... ($i/30)"
63+
sleep 2
64+
done
5565
- name: Start the newly build Docker container
5666
id: docker-run
5767
run: docker run --name my-container -p 4200:5000 --network data microtingas/frontend-container:latest "/ConnectionString=host=mariadbtest;Database=420_Angular;user=root;password=secretpassword;port=3306;Convert Zero Datetime = true;SslMode=none;" > docker_run_log 2>&1 &

0 commit comments

Comments
 (0)