Skip to content

Commit

Permalink
fix: change script to check docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
ljy2855 committed Feb 24, 2024
1 parent fa34e3b commit 06e46a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy_monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
port: ${{ secrets.PORT }}
script: |
echo "Checking Docker containers status..."
cd ${{secrets.PATH}}
FAILED_CONTAINERS=$(docker-compose -f docker-compose.yml ps -q | xargs docker inspect --format '{{if not .State.Running}} {{.Name}} {{end}}')
if [ -n "$FAILED_CONTAINERS" ]; then
echo "These containers are not running:$FAILED_CONTAINERS"
Expand Down

0 comments on commit 06e46a7

Please sign in to comment.