Skip to content

Commit

Permalink
ci: drone.yml init, go mod
Browse files Browse the repository at this point in the history
  • Loading branch information
hophacker authored and hophacker committed Feb 23, 2022
1 parent 9439d15 commit b055a7c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -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/css-checker.git
- git push github ${branch:-${DRONE_BRANCH}} --force
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module css-checker
module github.com/ruilisi/css-checker

go 1.18

Expand Down

0 comments on commit b055a7c

Please # to comment.