feat: add drone.yml
This commit is contained in:
parent
2fb628a68a
commit
645f6c59da
30
.drone.yml
Normal file
30
.drone.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: sync-to-github
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
path: /drone/src
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- promote
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: sync commit
|
||||||
|
image: alpine/git
|
||||||
|
environment:
|
||||||
|
SSH_KEY:
|
||||||
|
from_secret: github_ssh_key
|
||||||
|
commands:
|
||||||
|
- mkdir -p /root/.ssh/ && echo $SSH_KEY | base64 -d > /root/.ssh/id_rsa && chmod 600 /root/.ssh/id_rsa
|
||||||
|
- ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts && chmod 600 /root/.ssh/known_hosts
|
||||||
|
- git remote add github git@github.com:ruilisi/dotfiles.git
|
||||||
|
- git push github ${branch:-${DRONE_BRANCH}} --force
|
Loading…
Reference in New Issue
Block a user