'trigger azure pipeline from another repo, on tag

I am trying to trigger a pipeline when another repo is tagged.

resources:
  repositories:
    - repository: myrepo
      name: myproject/my-repo
      ref: main
      type: git
      trigger:
        tags:
          include:
            - "*"

I can run the pipeline manually, but it's not triggered via tag in the referenced repo.

I have also tried to provide a specific tag for test purposes. Which also didn't work when creating a tag from main branch via the UI.

tags:
  include:
    - "*"

Another thing I have tried is using the branch trick, which has helped me in the past for pipeline resources.

trigger:
  branches:
    include:
      - refs/tags/*


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source