From e4eafcd74d0c7de72414bfda83059e603f006691 Mon Sep 17 00:00:00 2001 From: jasder <2053003901@qq.com> Date: Wed, 2 Apr 2025 16:11:13 +0800 Subject: [PATCH] Update .trustie-pipeline.yml --- .trustie-pipeline.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index 2f19d65..c0c2b41 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -12,6 +12,7 @@ steps: # host、username、password可在参数管理中配置 - name: 远程主机部署 image: appleboy/drone-ssh + pull: if-not-exists # 添加此行,只在本地没有镜像时才拉取 settings: host: from_secret: deploy_ip @@ -27,5 +28,6 @@ steps: - chmod 777 /opt/test - docker rm -f nginx - echo ====开始部署======= - - docker run -d -p 58080:80 -v /opt/test:/usr/share/nginx/html:ro --name nginx nginx - - echo ====部署成功====== \ No newline at end of file + - docker run -d -p 58080:80 -v /opt/test:/usr/share/nginx/html:ro --name nginx nginx:1.24.0 + - echo ====部署成功====== + \ No newline at end of file