Promote in some case not work

In some case,promote operation not work

drone build promote <repo> <number> <environment>

for example,if the <number> is based on tag event will not work,but work fine based on a push/pull_request event.

assume below push piplines generate build number 34

kind: pipeline
type: docker
name: Push

steps:
  - name: install
    image: node:12-alpine
    commands:
      - echo push event

trigger:
  event:
    - push

and below tag piplines generate build number 35

kind: pipeline
type: docker
name: Tag

steps:
  - name: install
    image: node:12-alpine
    commands:
      - echo tag event

trigger:
  event:
    - tag

drone build promote repo/test 34 production works fine,
but drone build promote repo/test 35 production not work.

It seems,only if there is a commit head changes,the promote will work.

confused.

Promote does not work because your pipelines are limited to push events and tag events, which means you are excluding promote events. You need to adjust your pipelines accordingly.

  trigger:
    event:
      - tag
+     - promote
  trigger:
    event:
      - push
+     - promote