From 8d2cda8f19dd0576779164903ba3b9fbe23ae305 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 24 May 2023 07:12:05 +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 | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 83fbfe9..2a43015 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,16 +20,15 @@ steps: - name: shared path: /tmp/shared -- name: serve +- name: export image: python:3.7-alpine environment: - SSH_KEY: - from_secret: SSH_KEY + username: + from_secret: username + password: + from_secret: password commands: - apk add unzip wget make git curl openssh - - 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 @@ -40,13 +39,26 @@ steps: - source /tmp/shared/.venv/bin/activate - nohup python3 app.py 2>&1 > /dev/null & - sleep 3 - - ssh-keyscan -H git.omglinux.de -p 2222 >> ~/.ssh/known_hosts - - git clone ssh://git@git.omglinux.de:2222/michael/fdgl-production.git /tmp/shared/target + - git clone https://git.omglinux.de/michael/fdgl-production.git /tmp/shared/target - cd /tmp/shared/target - wget -mpEk http://127.0.0.1:5000 2>&1 > /dev/null || true - - git add -A - - git commit -m "automatic commit $(date)" - - git push origin main + volumes: + - name: shared + path: /tmp/shared + +- name: push + image: appleboy/drone-git-push + settings: + branch: main + remote: ssh://git@git.omglinux.de:2222/michael/fdgl-production.git + force: false + commit: true + commit_message: "Drone build ${DRONE_COMMIT_SHA:0:7}" + author_name: "Drone CI" + author_email: "drone@omglinux.de" + path: /tmp/shared/target + ssh_key: + from_secret: ssh_key volumes: - name: shared path: /tmp/shared