Add GitHub workflows to trigger Azure DevOps builds from a branch with access restriction#799
Draft
Add GitHub workflows to trigger Azure DevOps builds from a branch with access restriction#799
Conversation
Member
|
@copilot i dont need it to be continous delivery focused, just a way for us to start a build from a branch targetting a build in azure |
Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add GitHub workflows to trigger Azure builds
Add GitHub workflows to trigger Azure DevOps CI and CD pipelines with access restriction
Feb 28, 2026
Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
Contributor
Author
Simplified in 3a64113. The workflow now has a single |
Copilot
AI
changed the title
Add GitHub workflows to trigger Azure DevOps CI and CD pipelines with access restriction
Add GitHub workflows to trigger Azure DevOps builds from a branch with access restriction
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two GitHub Actions workflows that trigger Azure DevOps pipeline runs via the REST API, with access control enforced at the workflow level.
Workflows added
trigger-azure-ci.yml— Fires onpush/pull_requesttomain. Queues the Azure DevOps CI pipeline, forwardingGitHubRunId,GitHubRef, andGitHubSHAas pipeline parameters.trigger-azure-cd.yml—workflow_dispatchonly. Accepts a singlebranchinput and queues a build for that branch in Azure DevOps. Targetsenvironment: protected, which gates execution behind required-reviewer approval configured in Settings → Environments.Access restriction mechanism
The manual trigger workflow uses a GitHub Environment with protection rules — the job is paused until an approved reviewer clicks Approve and deploy. No code change required to add/remove approvers; it's managed entirely in repo settings.
One-time GitHub setup required
AZURE_DEVOPS_TOKEN(PAT,Build: Read & execute)AZURE_CI_PIPELINE_IDAZURE_PIPELINE_IDprotectedwith required reviewersSecurity
User-controlled values (
github.head_ref,inputs.branch) are mapped to env vars before shell execution to prevent script injection.permissions: {}is set on both jobs (least-privilegeGITHUB_TOKEN).Todos
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.