Share via

Hello! I am trying to trigger an ADO pipeline with changes on GitHub source repo.

Zeeshan Ahmed 20 Reputation points
2026-04-14T10:06:49.9933333+00:00

My pipeline has its script in ADO, while the source code resides in GitHub. I need the pipeline to trigger automatically if there is a change in the source code. I have tried everything, right from making sure the service connection has the right access, to adding the correct script to include the branch in question, but nothing seems to work so far. Can someone please help? Thanks!

Azure DevOps
0 comments No comments

Answer accepted by question author

Siddhesh Desai 7,160 Reputation points Microsoft External Staff Moderator
2026-04-14T10:36:08.3933333+00:00

Hi @Zeeshan Ahmed

Updated answer:

According to this document: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/resources-repositories-repository?view=azure-pipelines#properties

Repository resource triggers are supported only for Azure Repos Git repositories.

Repository resource triggers (resources: repositories: … trigger:) are supported only for Azure Repos Git repositories and do not work for GitHub repository resources. So even though your service connection is authorized, the organization mapping is correct, and GitHub webhooks exist, Azure DevOps will ignore the resources.repositories.trigger block when type: github is used

You can try using below workarounds:

Use a “triggering” pipeline that is directly connected to GitHub, then trigger your main pipeline using a pipeline completion trigger (recommended workaround) Pipeline completion triggers are the supported way to automatically run one pipeline after another finishes.

  1. Create Pipeline A (GitHub-CI) in Azure DevOps but select GitHub repo as the pipeline repository (so CI triggers are supported natively for GitHub).
  2. Then configure Pipeline B (your existing pipeline where YAML is stored in ADO) to run when Pipeline A completes using resources: pipelines:

Pipeline A (GitHub-CI) – runs on GitHub pushes:

YAML

trigger:
  branches:
    include:
      - 'Test#Sprint2'
pool:
  vmImage: ubuntu-latest
steps:
- script: echo "GitHub change detected. Down

Pipeline B (Main pipeline) – triggered by completion of Pipeline A:

YAML

trigger: none 
resources:
  pipelines:
  - pipeline: githubci
    source: GitHub-CI     # exact name of Pipeline A in Azure DevOps
    trigger: true
steps:
- script: echo "Main pipeline running after GitHub-C

Don’t rely on resources.repositories.trigger for GitHub repos (it won’t fire) Even if your YAML is syntactically correct, GitHub repository resources cannot trigger pipelines via resources.repositories.trigger because Microsoft’s schema notes it is supported only for Azure Repos Git repositories.

Ensure Azure DevOps UI settings are not overriding your YAML triggers Azure DevOps allows trigger settings in the UI to override YAML trigger configuration. If triggers don’t fire as expected, check pipeline Edit → Triggers and verify that “Override the YAML trigger from here” isn’t enabled for CI/PR triggers.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-04-14T10:07:07.33+00:00

    Use the GitHub repository as the pipeline’s repository and configure CI triggers in the pipeline definition. Key checks and steps:

    1. Confirm the GitHub connection type
      • In Azure DevOps, open the pipeline → Edit.
      • Select TriggersYAMLGet sources.
      • In the banner Authorized using connection: select the service connection.
      • Verify it is either Azure Pipelines app (GitHub app) or oauth/PAT and that it is valid.
    2. If using OAuth/PAT, verify GitHub webhooks
      • In GitHub, go to Repository → Settings → Webhooks.
      • Ensure there are webhooks for push, pull_request, and issue_comment.
      • Open each webhook and check that recent deliveries for your test commits show status 200 and are not failing. If webhooks are missing or failing, recreate the service connection in Azure DevOps and update the pipeline to use the new connection.
    3. Ensure the pipeline is not paused or disabled
      • In Azure DevOps, open the pipeline → EditSettings.
      • Confirm the pipeline is enabled and not paused; otherwise triggers will not fire.
    4. Verify the YAML trigger configuration and branch
      • Make sure the YAML file that defines the pipeline is in the GitHub repo and in the same branch where changes are pushed.
      • In the YAML, confirm that the trigger section includes the branch in question and does not exclude it via exclude or paths filters.
      • Do not use variables in trigger or paths, as variables in trigger definitions are not supported.
      • If using templates, ensure triggers are defined in the main YAML file, not inside templates.
      • Remember that path filters are case-sensitive; verify folder names exactly match the repo.
    5. Check for repo/org mapping issues
      • If the GitHub repo is already mapped to a different Azure DevOps organization via the Azure Pipelines GitHub app, only that first org will receive automatic triggers. In that case, uninstall the Azure Pipelines app from the GitHub organization and reinstall it, selecting the correct Azure DevOps organization during setup.
    6. Test with a simple change
      • Commit a small change to a file in an included path on the included branch.
      • Confirm a new run appears in Azure DevOps for that pipeline.

    If CI triggers were working previously and suddenly stopped, additionally check for merge conflicts in PRs and any service delays using the Azure DevOps status page.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.