Skip to content

Commit

Permalink
limit waiting for mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
ployt0 committed Aug 7, 2023
1 parent 9ed6fbc commit a87236c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,20 @@ jobs:
- name: Await return of mariadb container
run: |
sleeps=0
while ! docker exec mariadb mysql -uroot -pmypass -e "SELECT 1" >/dev/null 2>&1; do
echo sleeping.
docker ps # Read headlines.
sleep 1
sleeps=$((sleeps + 1))
if [[ $sleeps -ge 5 ]]
then
docker stats --no-stream
fi
if [[ $sleeps -eq 12 ]]
then
exit 1
fi
sleep $sleeps
done
- name: Use WP's IP for DB user
Expand Down

0 comments on commit a87236c

Please sign in to comment.