synchronization

This commit is contained in:
2025-08-25 16:04:54 +08:00
commit cbae9a4800
6 changed files with 182 additions and 0 deletions

35
.drone-minio.yml Normal file
View 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/