diff --git a/.drone.yml b/.drone.yml index 5f324b4..45c6a2e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -43,7 +43,7 @@ steps: # 定义管道的执行步骤 - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWD git.hiiragi.club:8081 - docker pull git.hiiragi.club:8081/mol/mirai-robot:latest - list=$(docker ps -a | grep mirai_robot* | awk '{print $1}') - - test "$list" = "" && echo "none mirai_robot containers running" || docker container rm $list + - test "$list" = "" && echo "none mirai_robot containers running" || docker stop $list && docker container rm $list # 过滤出dockerImages的id, 删除none镜像 - docker run -d -p 16808:8080 --name=mirai_robot_${DRONE_BUILD_NUMBER} -e QQ=3377438428 -e WEB_HOOK_PORT=8080 -e IMG_NUMBER_IN_ONE_MESSAGE=3 -e MIRAI_HTTP_API_HOST=http://192.168.124.12:15122 -e MIRAI_HTTP_API_VERIFY_KEY=heiyu518 git.hiiragi.club:8081/mol/mirai-robot:latest - docker rmi $(docker images | grep "none" | awk '{print $3}')