From 159eb1f343e538360a8c452684d79a56f84b22e5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 13 Dec 2024 16:36:21 +0800 Subject: [PATCH] fix: ci --- .drone.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 260ebbb..adbd9ee 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,12 +29,11 @@ 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 submodule update --init --recursive @@ -46,6 +45,9 @@ steps: - 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 +56,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