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

36
.drone-oss.yml Normal file
View File

@@ -0,0 +1,36 @@
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 OSS
image: registry.cn-hangzhou.aliyuncs.com/offends/drone:oss
pull: if-not-exists
environment:
OOS_ENDPOINT:
from_secret: OOS_ENDPOINT
OOS_ACCESSKEYID:
from_secret: OOS_ACCESSKEYID
OOS_ACCESSKEYSECRET:
from_secret: OOS_ACCESSKEYSECRET
OOS_PATH:
from_secret: OOS_PATH
commands:
- ossutil64 -e $OOS_ENDPOINT -i $OOS_ACCESSKEYID -k $OOS_ACCESSKEYSECRET cp ./*.tar.gz $OOS_PATH --force