diff --git a/.drone.yml b/.drone.yml index 260ebbb..6ef148c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,23 +29,19 @@ steps: pull: if-not-exists volumes: - name: gitea - path: /gitea + path: /root/.ssh/id_rsa commands: - echo 192.168.0.2 git.1000my.com >> /etc/hosts - ping git.1000my.com -c 1 - - mkdir -p $HOME/.ssh/ - - cat /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 clone --depth=1 $DRONE_GIT_HTTP_URL . - git submodule update --init --recursive - - git -c advice.detachedHead=false checkout $DRONE_COMMIT - - git status - - pwd - - ls -la - name: 生成Release版本 pull: if-not-exists image: registry.cn-hangzhou.aliyuncs.com/tgabc-namespace/tgabc:semantic-release-v21.0.1 + volumes: + - name: gitea + path: /root/.ssh/id_rsa environment: GITEA_TOKEN: from_secret: gitea_token @@ -54,10 +50,16 @@ steps: from_secret: gitea_username git_password: from_secret: gitea_password + commands: + - echo 192.168.0.2 git.1000my.com >> /etc/hosts + - semantic-release - name: 获取tag数据 image: registry.cn-hangzhou.aliyuncs.com/qmiot/init:alpine-git-v2.36.2 commands: + - ping git.1000my.com -c 1 + - echo 192.168.0.2 git.1000my.com >> /etc/hosts + - ping git.1000my.com -c 1 - git fetch --tags - git submodule init - git submodule update --recursive --remote