Skip to content

Commit c3266c8

Browse files
authored
Update docker-image.yml
1 parent 68dc7c1 commit c3266c8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/docker-image.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,17 @@ jobs:
1717
- name: Set up Docker Buildx
1818
uses: docker/setup-buildx-action@v2
1919

20-
- name: Build and start services with Docker Compose
21-
run: docker compose up -d --build
20+
- name: Build and start services with Docker Compose (CI Mode)
21+
run: |
22+
CI=true COMMAND="npx serve -s build" docker compose up -d --build
2223
2324
- name: Check running containers
2425
run: docker ps -a
26+
27+
- name: Check for container failures
28+
run: |
29+
docker compose logs --tail=50
30+
if [ "$(docker compose ps --format '{{.State}}' | grep -c exited)" -gt 0 ]; then
31+
echo "A container has exited with an error. Failing the workflow."
32+
exit 1
33+
fi

0 commit comments

Comments
 (0)