# ===================== 流水线1:仅自动触发(push到main分支)===================== kind: pipeline type: docker name: auto-pipeline-main # 自动流水线名称 clone: disable: false trigger: event: [push] # 仅接收push事件 branch: [main] # 仅main分支 steps: - name: print-auto-run image: alpine:latest environment: REPO_UID: "{{ .repo.uid }}" commands: - echo =================================== - echo 这是自动运行的流水线 - echo 自动运行 - echo =================================== --- # Drone 支持一个文件多个流水线,用 --- 分隔 # ===================== 流水线2:仅手动触发(独立节点,100%显示)===================== kind: pipeline type: docker name: manual-pipeline-main # 手动流水线名称 clone: disable: false trigger: event: [manual] # 仅接收手动触发事件,无其他过滤 steps: - name: print-manual-run image: alpine:latest environment: REPO_UID: "{{ .repo.uid }}" commands: - echo =================================== - echo 🚀 独立手动流水线(必显示) - echo 手动运行成功! - echo ===================================