Skip to content

Commit

Permalink
add debug code 2
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue committed Dec 25, 2024
1 parent 0ceab0b commit ef348be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/scripts/docker_compose_clean_up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ case "$1" in
pip install jq yq
pip list | grep jq
pip list | grep yq
ports=$(export $PATH | yq '.services[].ports[] | split(":")[0]' $yaml_file | grep -o '[0-9]\+')
echo "$ports"
for port in $ports; do
cid=$(docker ps --filter "publish=${port}" --format "{{.ID}}")
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
done
yq '.services[].ports[] | split(":")[0]' $yaml_file | grep -o '[0-9]\+'
# echo "$ports"
# for port in $ports; do
# cid=$(docker ps --filter "publish=${port}" --format "{{.ID}}")
# if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
# done
;;
*)
echo "Unknown function: $1"
Expand Down

0 comments on commit ef348be

Please sign in to comment.