This commit is contained in:
2024-12-03 09:00:31 +08:00
parent 9fe2221fcf
commit c6b62785a7
2 changed files with 18 additions and 20 deletions

View File

@@ -4,25 +4,23 @@ name: default
clone:
disable: true
extra_hosts:
- "git.buyusdt.xyz:192.168.31.100"
steps:
- name: myclone
image: drone/git:latest
# volumes:
# - name: 1panel-nginx-static
# path: /drone/src/xiezheng_h5
- name: copy
image: 2271608011/bmygit:v1
network_mode: host
environment:
SSH_PASSWORD:
from_secret: ssh_password
SSH_USERNAME:
from_secret: ssh_username
SSH_IP:
from_secret: ssh_ip
SSH_STATIC_PATH:
from_secret: ssh_static_path
SSH_CLONE_URL:
from_secret: git_clone_url
commands:
- echo "192.168.31.100 git.buyusdt.xyz" >> /etc/hosts
- git config --global http.sslVerify "false"
- git clone https://git.buyusdt.xyz/bmy/xiezheng_h5.git
- uname -a
- cat /proc/version
- apk --no-cache add sshpass
- scp -v
# volumes:
# - name: 1panel-nginx-static
# host:
# path: /home/bmy/1panel/apps/openresty/openresty/www/sites/site.buyusdt.xyz/index/xz/
- echo "$SSH_IP git.buyusdt.xyz" >> /etc/hosts
- git clone $SSH_CLONE_URL
- sshpass -p $SSH_PASSWORD scp -o StrictHostKeyChecking=no -r /drone/src/xiezheng_h5/* $SSH_USERNAME@$SSH_IP:$SSH_STATIC_PATH