Skip to content

Commit

Permalink
Using a sleeper & trying agian
Browse files Browse the repository at this point in the history
  • Loading branch information
kek20009 committed Oct 31, 2024
1 parent cc8ad7c commit 882bfeb
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/ms5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 882bfeb

Please sign in to comment.