From e3ff099b6753385acce883f9de750c284562ea64 Mon Sep 17 00:00:00 2001 From: moweishan <13892077751@163.com> Date: Wed, 31 Dec 2025 02:22:11 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.drone.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 92dd4ac..017f15b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,9 +1,10 @@ ---- kind: pipeline type: docker name: main-automated-pipeline - +# 启用模板 +clone: + disable: false trigger: event: @@ -12,6 +13,7 @@ trigger: - manual steps: + # ========== 原有:push触发的自动运行节点 ========== - name: print-auto-run image: alpine:latest when: @@ -22,5 +24,20 @@ steps: commands: - echo =================================== - echo 这是自动运行的流水线 - - echo 自动运行 {{ .repo.uid }} + - echo 自动运行 + - echo =================================== + + # ========== 新增:手动触发的专属运行节点 ========== + - name: print-manual-run + image: alpine:latest + # 核心条件:仅当触发事件为 manual 时执行 + when: + event: manual + environment: + REPO_UID: "{{ .repo.uid }}" + commands: + - echo =================================== + - echo 这是手动触发的流水线 + - echo 手动运行(支持手动点击/API触发) + - echo 当前仓库UID: ${REPO_UID} - echo =================================== \ No newline at end of file