Files
test/.drone.yml
moweishan 24e5789f41
All checks were successful
continuous-integration/drone/push Build is passing
更新 .drone.yml
2025-12-31 02:24:54 +00:00

47 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
kind: pipeline
type: docker
name: main-automated-pipeline
clone:
disable: false
# 顶层触发器:允许 push/promote/manual 三类事件唤醒流水线
trigger:
event:
- push
- promote
- manual
steps:
# ===== 原有自动节点push到main分支自动执行保留不变=====
- name: print-auto-run
image: alpine:latest
when:
event: push
branch: main
environment:
REPO_UID: "{{ .repo.uid }}"
commands:
- echo ===================================
- echo 这是自动运行的流水线
- echo 自动运行
- echo ===================================
# ===== 手动触发节点【修复后核心配置】=====
- name: print-manual-run
image: alpine:latest
# ✅ 关键修复1添加 branch: [ main, '*' ] 兼容所有分支手动触发
# ✅ 关键修复2用列表格式Drone 推荐写法兼容性100%
when:
event:
- manual
branch:
- main
- '*' # 通配符,匹配所有分支,彻底解决分支冲突问题
environment:
REPO_UID: "{{ .repo.uid }}"
commands:
- echo ===================================
- echo 🚀 这是手动触发的流水线(已生效)
- echo 手动运行成功!
- echo ===================================