platypush/.drone.yml
Fabio Manganiello 82811a11a6
Replaced git push --mirror with git push --all in drone.yml.
If the local clone doesn't have the tags or branches for some reason, we
don't want to lose that information on the Github repo.
2023-07-25 00:21:56 +02:00

42 lines
1,003 B
YAML

---
kind: pipeline
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 <<EOF > ~/.ssh/id_rsa.pub
$SSH_PUBKEY
EOF
- |
cat <<EOF > ~/.ssh/id_rsa
$SSH_PRIVKEY
EOF
- chmod 0600 ~/.ssh/id_rsa
- ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null
- git config --global --add safe.directory $PWD
- git remote add github git@github.com:/BlackLight/platypush.git
- git pull github master
- git push --all -v github
- name: run-tests
image: python:3.11-alpine
commands:
- apk add --update --no-cache redis
- apk add --update --no-cache --virtual build-base g++ rust
- pip install -U pip
- pip install .
- pip install -r requirements-tests.txt
- apk del build-base g++ rust
- pytest tests