diff --git a/.drone.yml b/.drone.yml index 28a98c5..c74ba56 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,26 +18,21 @@ volumes: - name: dockersock host: path: /data/drone/docker/sock - - name: host-time + - name: gitea host: - path: /etc/localtime + path: /gitea steps: - name: "Checkout" image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:alpine-git-v2.36.2 pull: if-not-exists - environment: - SSHKEY: - from_secret: drone_ci_sshkey_file - GIT_HOST: git.1000my.com - GIT_PORT: 22 commands: + - echo 192.168.0.2 git.1000my.com >> /etc/hosts - ping git.1000my.com -c 1 - mkdir -p $HOME/.ssh/ - - echo $SSHKEY | md5sum - - echo $SSHKEY > ~/.ssh/id_rsa && chmod 600 $HOME/.ssh/id_rsa - - ssh-keyscan $GIT_HOST > ~/.ssh/known_hosts + - echo /gitea > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa + - ssh-keyscan git.1000my.com > ~/.ssh/known_hosts - git clone --depth=1 $DRONE_GIT_SSH_URL . - git submodule update --init --recursive - git -c advice.detachedHead=false checkout $DRONE_COMMIT