From 882bfeb396a1227b23331f41ce9a1e9383f7f63f Mon Sep 17 00:00:00 2001 From: kek20009 Date: Thu, 31 Oct 2024 15:01:49 -0400 Subject: [PATCH] Using a sleeper & trying agian --- .github/workflows/ms5.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ms5.yaml b/.github/workflows/ms5.yaml index d4fd1cb..aea08a8 100644 --- a/.github/workflows/ms5.yaml +++ b/.github/workflows/ms5.yaml @@ -38,24 +38,13 @@ jobs: docker build -t api-image -f Backend/dockerfile . - #Check if API Container is running - - name: is container running? - run: | - if [ "$(docker ps -q -f name=api-container)" ]; then - echo "Stopping existing API container..." - docker stop api-container - sleep 10 - fi - if [ "$(docker ps -aq -f status=exited -f name=api-container)" ]; then - echo "Removing existing API container..." - docker rm api-container - fi - # Stop and Remove Existing Container (if any). this was the error - name: Stop and Remove Existing API Container run: | docker stop api-container || true # Stop if running, ignore if not + sleep 10 docker rm api-container || true # Remove if exists, ignore if not + sleep 10 #Start API Container - name: Start API Container