synchronization
This commit is contained in:
35
.drone-minio.yml
Normal file
35
.drone-minio.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Git Backup
|
||||
|
||||
# 手动触发或接口触发
|
||||
trigger:
|
||||
event:
|
||||
- custom
|
||||
|
||||
steps:
|
||||
# 账号密码特殊字符需要使用 URL 编码代替
|
||||
- name: Git Clone
|
||||
image: registry.cn-hangzhou.aliyuncs.com/offends/drone:git
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
GIT_USERNAME:
|
||||
from_secret: GIT_USERNAME
|
||||
GIT_PASSWORD:
|
||||
from_secret: GIT_PASSWORD
|
||||
commands:
|
||||
- bash Build.sh $GIT_USERNAME $GIT_PASSWORD
|
||||
|
||||
- name: Backup File To Minio
|
||||
image: registry.cn-hangzhou.aliyuncs.com/offends/drone:mc
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
MINIO_URl:
|
||||
from_secret: MINIO_URl
|
||||
MINIO_ACCESS_KEY:
|
||||
from_secret: MINIO_ACCESS_KEY
|
||||
MINIO_SECRET_KEY:
|
||||
from_secret: MINIO_SECRET_KEY
|
||||
commands:
|
||||
- mc config host add minio $MINIO_URl $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
|
||||
- mc cp ./*.tar.gz minio/backup/
|
Reference in New Issue
Block a user