Compares Azure DevOps Pipelines and GitHub Actions: YAML structure, stages and jobs, templates and reusable workflows, environments, approvals and checks, service connections and OIDC, and how to choose.
Both run YAML pipelines as code. Azure Pipelines has a genuine stage level (stages → jobs → steps), and its environments and other resources carry approvals and checks (manual approval, branch control, business hours, exclusive lock, Azure Monitor gates), with templates for reuse. GitHub Actions has no stage concept: workflows → jobs → steps, chained with needs:, plus environments with required reviewers, wait timers and branch rules, and reusable workflows and composite actions.
Both authenticate to Azure without secrets: Azure DevOps through workload identity federation service connections, GitHub through OIDC with azure/login.
I choose mostly by where the code, backlog and audit evidence already live. Both are actively developed: GitHub tends to get developer-experience features first (Copilot, the marketplace), while Azure DevOps keeps strong enterprise traceability (Boards, Test Plans, resource checks) that many Australian enterprises and government teams depend on.
"Conceptually they're the same: a YAML file in the repo, triggered by pushes or PRs, running jobs on hosted or self-hosted agents. The vocabulary differs. Azure Pipelines has stages, which contain jobs, which contain steps; a deployment job targets an environment, and that environment is where you hang approvals and checks. GitHub Actions has workflows with jobs that you order with
needs:; there's no stage keyword, so a 'stage' is just a job or group of jobs, and a job can reference an environment with required reviewers.The differences show up in governance. Azure DevOps environments and service connections support a long list of checks: manual approvals, branch control so only
maincan use the production connection, business-hours windows, exclusive locks so deployments queue rather than overlap, and gates that query Azure Monitor. GitHub covers the common ones (required reviewers, wait timers, deployment branch rules, andconcurrencyfor queuing), and custom deployment protection rules for the rest. For reuse, Azure has templates andextendstemplates that let a platform team force every pipeline through approved steps; GitHub has reusable workflows and composite actions, plus required workflows through rulesets.The mistake I see is teams treating this as a technical decision when it's mostly an organisational one. If the code and backlog are already in Azure Repos and Boards, and auditors like the approval history there, migrating buys little. If the code is on GitHub, I'd use Actions rather than wiring Azure Pipelines to GitHub. For a new team I'd lean to GitHub because that's where Microsoft is putting most new features, but either is a sound choice."
| Concept | Azure Pipelines | GitHub Actions |
|---|---|---|
| File | azure-pipelines.yml |
.github/workflows/*.yml |
| Top level | stages: |
jobs: |
| Ordering | dependsOn: |
needs: |
| Deploy target | deployment job + environment: |
job with environment: |
| Reuse | templates, extends: |
reusable workflows (workflow_call), composite actions |
| Variables / secrets | variable groups, library, Key Vault-linked groups | repo/org/environment variables and secrets |
| Azure auth | service connection (workload identity federation) | azure/login with OIDC |
| Runners | Microsoft-hosted / self-hosted agents, scale set agents | GitHub-hosted / self-hosted runners, larger runners |
| Artefacts | Pipeline artifacts, Azure Artifacts feeds | workflow artefacts, GitHub Packages |
| Check | Azure DevOps | GitHub |
|---|---|---|
| Manual approval | Yes (environment/resource) | Required reviewers on environment |
| Branch restriction | Branch control check | Deployment branches/tags rule |
| Time window | Business hours check | Wait timer (delay only); custom rule for windows |
| No overlapping deploys | Exclusive lock | concurrency: group |
| Query monitoring | Azure Monitor alerts / REST gate | Custom deployment protection rule (GitHub App) |
| Enforced template | extends + required template check |
Required workflows via rulesets |
| Situation | Choice |
|---|---|
| Code on GitHub, new team | GitHub Actions |
| Azure Repos + Boards + test plans already embedded | Stay on Azure DevOps |
| Heavy compliance needing richer built-in checks | Azure DevOps, or GitHub with custom protection rules |
| Mixed estate | Code where it is; avoid cross-wiring both systems per repo |
A state government agency kept Azure DevOps because change approvals in Boards fed their ITIL process; production stages used a business-hours check and an exclusive lock, which cut overlapping deploy incidents to zero. A SaaS team on GitHub moved from Azure Pipelines to Actions and reduced their pipeline YAML from about 400 to 150 lines by using one reusable workflow across 12 services.
Checks whether the candidate knows both platforms' building blocks well enough to map one to the other, and chooses based on organisational context rather than preference.
Green flags
Red flags
Azure Pipelines GitHub Actions
pipeline workflow
└─ stage: Build ├─ job: build
│ └─ job: build │ └─ steps
│ └─ steps ├─ job: deploy-test (needs: build, environment: test)
└─ stage: DeployProd (dependsOn: Build) └─ job: deploy-prod (needs: deploy-test, environment: production)
└─ deployment job (environment: prod)
└─ strategy: runOnce | rolling | canary
Azure deployment jobs have built-in strategies (runOnce, rolling, canary) with lifecycle hooks (preDeploy, deploy, routeTraffic, postRouteTraffic, on: failure). In GitHub you script the equivalent steps yourself.
In Azure DevOps, checks attach to resources: environments, service connections, agent pools, variable groups, repos. A stage pauses when it first uses a protected resource. That means you can protect the production service connection itself, so even a badly written pipeline can't use it without approval.
In GitHub, protection attaches to environments; secrets and variables scoped to an environment are only available after its rules pass. Combine with OIDC subjects scoped to the environment for the same effect.
Azure DevOps service connections using workload identity federation (generally available since 2024) work like GitHub OIDC: Azure DevOps issues a token whose subject identifies the organisation, project and service connection, and Entra trusts it through a federated credential. Existing secret-based connections can be converted in place.
template: includes steps/jobs/stages with typed parameters; extends: makes a pipeline inherit a template that can forbid arbitrary steps. A "required template" check on a resource enforces it.workflow_call reusable workflows (called as a job), composite actions (a bundle of steps), and organisation rulesets that can require a workflow to pass.Microsoft continues to support Azure DevOps and ships updates, but most new developer-platform features (Copilot integration, Advanced Security features first, the marketplace ecosystem) land in GitHub first. GitHub Advanced Security is also available for Azure DevOps. Classic (UI) release pipelines are legacy; new work should use YAML multi-stage pipelines.
concurrency: production to a GitHub job and trigger two runs to see the second one queue.The same build-and-deploy shape in Azure Pipelines (azure-pipelines.yml):
trigger:
branches: { include: [main] }
variables:
buildConfiguration: Release
stages:
- stage: Build
jobs:
- job: build
pool: { vmImage: ubuntu-latest }
steps:
- task: UseDotNet@2
inputs: { useGlobalJson: true }
- script: dotnet test -c $(buildConfiguration) --logger trx
displayName: Build and test
- task: PublishTestResults@2
condition: always()
inputs: { testResultsFormat: VSTest, testResultsFiles: '**/*.trx' }
- script: dotnet publish src/Orders.Api -c $(buildConfiguration) -o $(Build.ArtifactStagingDirectory)/app
- publish: $(Build.ArtifactStagingDirectory)/app
artifact: app
- stage: DeployProd
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: deploy
environment: orders-prod # approvals, branch control, exclusive lock configured here
pool: { vmImage: ubuntu-latest }
strategy:
runOnce:
deploy:
steps:
- task: AzureWebApp@1
inputs:
azureSubscription: sc-orders-prod-wif # workload identity federation, no secret
appName: app-orders-prod-aue
deployToSlotOrASE: true
resourceGroupName: rg-orders-prod-aue
slotName: staging
package: $(Pipeline.Workspace)/app
And the equivalent GitHub Actions job ordering:
jobs:
build:
uses: contoso/platform/.github/workflows/dotnet-build.yml@v3 # reusable workflow
deploy-prod:
needs: build
environment: production # required reviewers + deployment branch rule
concurrency: production # like an exclusive lock
runs-on: ubuntu-latest
permissions: { id-token: write }
steps:
- uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- run: az webapp deploy -g rg-orders-prod-aue -n app-orders-prod-aue --slot staging --src-path app.zip
A tiny C# check both pipelines can run as a smoke test step (tools/SmokeTest/Program.cs):
using System.Net.Http;
var url = args.Length > 0 ? args[0] : throw new ArgumentException("Pass the base URL.");
using var http = new HttpClient { Timeout = TimeSpan.FromSeconds(10) };
for (var attempt = 1; attempt <= 10; attempt++)
{
try
{
using var response = await http.GetAsync($"{url}/health/ready");
if (response.IsSuccessStatusCode) { Console.WriteLine("Ready"); return 0; }
}
catch (HttpRequestException) { /* app still starting */ }
await Task.Delay(TimeSpan.FromSeconds(6));
}
Console.Error.WriteLine("Smoke test failed");
return 1; // non-zero fails the pipeline step
needs:.I treat the CI/CD platform as part of the organisation's control system, not just a build tool. The questions that decide it are: where do code and backlog live, where must auditors find approval evidence, and who owns the shared templates? Technically, both platforms can deliver secretless, approved, repeatable deployments.
Whatever the platform, put the controls on the resources (environments, identities, connections), not in individual pipelines, and give a platform team ownership of versioned templates or reusable workflows.
| Option | When it fits | Cost | When not to |
|---|---|---|---|
| GitHub Actions | Code on GitHub; new teams; open-source style collaboration | Some enterprise checks need custom rules | Organisation is deeply invested in Boards/Test Plans |
| Azure DevOps Pipelines | Azure Repos/Boards estate, rich resource checks, ITIL processes | Fewer new features, smaller marketplace | Code is on GitHub (don't cross-wire) |
| Both, split by team | Large, mixed estates during migration | Two sets of templates, skills and controls | Long term without a plan |
I generate migrations locally with dotnet ef migrations add, then make deployment a separate, reviewed step. The pipeline produces an artefact: either an idempotent SQL script (dotnet ef migrations script --idempotent) for a DBA to review, or a migration bundle (dotnet ef migrations bundle), a self-contained executable that applies pending migrations. That artefact runs once, before the new app version starts, with a dedicated deployment identity. I avoid Database.Migrate() at startup because several instances can race, the app needs DDL permissions it shouldn't have, and a failed migration turns into a crash loop.
The workflow has a build job (restore, build, test, dotnet publish /t:PublishContainer to push an image tagged with the commit SHA to Azure Container Registry) and deploy jobs per environment that reuse that same image.
For Azure access I use OpenID Connect: the job declares permissions: id-token: write, GitHub issues a short-lived token, and azure/login exchanges it for an Entra token through a federated credential on an app registration or user-assigned managed identity. No client secret is stored anywhere.
Production is gated with a GitHub environment that has required reviewers, and the federated credential's subject is scoped to environment:production, so only an approved job can get production access.
The trade-off: OIDC needs one-off Entra setup per repo and environment, but removes secret rotation and leaked-secret risk entirely.
My rule is to remove secrets rather than protect them. The pipeline authenticates to Azure with OIDC / workload identity federation: the CI platform issues a short-lived token that Entra trusts, so no client secret is stored. The app authenticates to SQL, Storage and Key Vault with managed identity. Remaining secrets (third-party API keys) live in Key Vault; the pipeline deploys only a Key Vault reference such as @Microsoft.KeyVault(VaultName=...;SecretName=...) as an app setting, and the platform resolves it with the app's identity, so the value never passes through the pipeline.
Pipeline identities are least privilege: one per environment, roles on a resource group, protected by environment approvals. Secret scanning with push protection blocks committed secrets.
If a secret leaks, I revoke and rotate first, then clean logs, then check access logs. The trade-off is up-front identity setup in exchange for nothing worth stealing in the pipeline.
Last updated 23 Nov 2026.