Skip to content

Commit

Permalink
Fix: ci pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
RouHim authored Aug 26, 2024
1 parent 36ec59e commit b751bd1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

# Spin up a new container
echo "🚀 Spinning up a test container"
docker-compose up -d
docker compose up -d

# Loop until the string is found
echo "🔍 Checking for the desired string in the logs..."
while true; do
# Check if the desired string is in the logs
if docker-compose logs | grep -q "Please restart the server"; then
if docker compose logs | grep -q "Please restart the server"; then
echo "✅ Dedicated server started successfully"
break
fi

# Print the 5 lines tail of the logs
echo "📃 Desired string not found in the logs, printing the last 5 lines of the logs:"
echo "========================================"
docker-compose logs --tail 5
docker compose logs --tail 5
echo "========================================"

# Wait for 5 seconds before checking again
Expand All @@ -25,6 +25,6 @@ while true; do
done

# Cleanup and exit with 0
docker-compose kill && docker-compose down --volumes
docker compose kill && docker compose down --volumes
echo "✅ Done, everything looks good"
exit 0

0 comments on commit b751bd1

Please sign in to comment.