Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (7k points)

Is there a way to have a yaml pipeline trigger on commits/PRs for branches of different repositories?

1 Answer

0 votes
by (31.9k points)
edited by

The below example shows how to define it:

trigger:

- main

resources:

  repositories:

  - repository: tools

    type: git

    name: MyProject/tools

    ref: main

    trigger:

      branches:

        include:

        - main

        - release

The pipeline  will be triggered if there are any updates to:

    the main branch in the self-repository containing the YAML file

    main or release branches in the tools repo

And also check out Intellipaat's Azure Administrator Certification and become an Azure expert

Want to become Azure Developer, check out this Azure Tutorial.

Browse Categories

...