From 4ed454f3a4438b4db1b2834ce897314d8a71c16f Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 24 May 2023 06:47:14 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9E.drone.yml=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 79bba7c..a1441c7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,8 +22,13 @@ steps: - name: serve image: python:3.7-alpine + environment: + - SSH_KEY: ${SSH_KEY} commands: - apk add unzip wget make git curl + - mkdir /root/.ssh && echo "$SSH_KEY" > /root/.ssh/id_rsa && chmod 0600 /root/.ssh/id_rsa + - git config --global user.name "Drone CI" + - git config --global user.email "drone@omglinux.de" - mkdir /tmp/content - curl https://cloud.fdgl.rocks/index.php/s/wGLnSaTiL2rn5ae/download -o /tmp/content.zip - unzip /tmp/content.zip -d /tmp @@ -34,11 +39,12 @@ steps: - source /tmp/shared/.venv/bin/activate - nohup python3 app.py 2>&1 > /dev/null & - sleep 10 - - mkdir -p /tmp/shared/target + - git clone ssh://git@git.omglinux.de:2222/michael/fdgl-production.git /tmp/shared/target - cd /tmp/shared/target - wget -mpEk http://127.0.0.1:5000 2>&1 > /dev/null || true - - ls /tmp/shared/target - - exit + - git add -A + - git commit -m "automatic commit $(date)" + - git push origin main volumes: - name: shared path: /tmp/shared