[Important] When a new tag is pushed on gitea, the pipeline on drone cannot be triggered

This problem has been bothering me for a long time. It is unfortunate that the problems I found on discourse are not the same.

So I just created this topic and hope that Mr. bradrydzewski can read and help me solve the problem, thank you!

Running

  1. Run drone/drone:latest&drone/agent:latest with docker
  2. Use docker to run gitea/gitea:latest as a git repository
version: '3'
services:
  drone:
    image: drone/drone:latest
    ports:
      - 127.0.0.1:4080:80
    volumes:
      - /opt/drone/data:/data
    environment:
      ......
    container_name: drone
    restart: always

  runner:
    image: drone/agent:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - drone
    environment:
      ......
    container_name: runner
    restart: always

Problem

When a new tag is pushed on gitea, the pipeline on drone cannot be triggered.

My .drone.yaml is written according to the documentation standard and is very simple.

---
kind: pipeline
type: docker
name: default

platform:
  os: linux
  arch: amd64

steps:
- name: build
  image: golang:latest
  environment:
    GOOS: linux
    GOARCH: amd64
    CGO_ENABLED: 0
  commands:
  - go build -o yourip
  - go test

- name: docker
  image: plugins/docker
  settings:
    username:
      from_secret: DOCKER_REGISTRY_USERNAME
    password:
      from_secret: DOCKER_REGISTRY_PASSWORD
    repo: registry.otokaze.cn/yourip
    registry: registry.otokaze.cn
    auto_tag: true
  when:
    ref:
    - refs/tags/v*
...

Logs

When I normally used git push origin v1.0.0 to create a remote tag, drone-server returned the following log.

[{
	"commit": "c7d694b4a75c7f36a0e5da6264ffac929c5705b0",
	"event": "tag",
	"level": "info",
	"msg": "trigger: skipping pipeline, does not match branch",
	"pipeline": "default",
	"ref": "refs/tags/v0.0.3",
	"repo": "otokaze/yourip",
	"time": "2019-11-14T17:18:40Z"
}, {
	"commit": "c7d694b4a75c7f36a0e5da6264ffac929c5705b0",
	"event": "tag",
	"level": "info",
	"msg": "trigger: skipping build, no matching pipelines",
	"pipeline": "default",
	"ref": "refs/tags/v0.0.3",
	"repo": "otokaze/yourip",
	"time": "2019-11-14T17:18:40Z"
}]

I tried using ref:refs/tags/v* instead of branch:master in the trigger. Even I removed all the conditions, but I couldn’t trigger the drone to execute the pipeline.

help me, please!

I’m going to crumble :sob:

This appears to be a duplicate of When a new tag is pushed on gitea, the pipeline on drone cannot be triggered ? Please do not post duplicate topics.