kind: pipeline type: docker name: main-automated-pipeline # 启用模板 clone: disable: false trigger: event: - push - promote - manual steps: # ========== 原有:push触发的自动运行节点 ========== - 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 # 核心条件:仅当触发事件为 manual 时执行 when: event: manual environment: REPO_UID: "{{ .repo.uid }}" commands: - echo =================================== - echo 这是手动触发的流水线 - echo 手动运行(支持手动点击/API触发) - echo 当前仓库UID: ${REPO_UID} - echo ===================================