From eadcfe345a27d6db62401e81bfa8e6869c64c6e4 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 25 Jul 2023 00:00:47 +0200 Subject: [PATCH] Added github-mirror step to .drone.yml --- .drone.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.drone.yml b/.drone.yml index 86c99375db..b00d5e4d68 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,6 +4,31 @@ type: docker name: default steps: +- name: github-mirror + image: alpine + environment: + SSH_PUBKEY: + from_secret: ssh_pubkey + SSH_PRIVKEY: + from_secret: ssh_privkey + + commands: + - apk add --update --no-cache git openssh + - mkdir -p ~/.ssh + - | + cat < ~/.ssh/id_rsa.pub + $SSH_PUBKEY + EOF + - | + cat < ~/.ssh/id_rsa + $SSH_PRIVKEY + EOF + - chmod 0600 ~/.ssh/id_rsa + - ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null + - git remote add github git@github.com:/BlackLight/platypush.git + - git pull github master + - git push --mirror -v github + - name: run-tests image: python:3.11-alpine commands: