How to Convert GitHub Actions to Azure Pipelines - Step by Step Guide
Input Your GitHub Actions Workflow
Start with an existing GitHub Actions workflow, whether you are moving to Azure Pipelines for good or just want to run the same build in Azure DevOps:
Example: GitHub Actions Workflow
name: CI Pipeline
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npm run buildWhat the Converter Changes
The pipeline appears a moment after you stop typing. Here is how the pieces of a workflow line up with Azure Pipelines YAML:
Example: the Same Workflow as azure-pipelines.yml
trigger:
branches:
include:
- '*'
pr:
branches:
include:
- '*'
jobs:
- job: build
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
- task: NodeTool@0
inputs:
versionSpec: '20'
- script: npm ci
- script: npm run buildReview the Notes
When something can't be carried over, the comment block at the top of the pipeline names it. The usual items:
Create the Pipeline in Azure DevOps
Frequently Asked Questions
What does the converter map, and what is left to me?
Push, pull request and schedule triggers become trigger:, pr: and schedules:, workflow_dispatch inputs become runtime parameters, each job keeps its needs as dependsOn, runs-on becomes a Microsoft-hosted vmImage, and a matrix becomes strategy.matrix with every combination spelled out. Checkout, setup-node, setup-python, setup-dotnet, setup-java, setup-go, cache and the artifact actions turn into their Azure tasks. Everything else, such as marketplace actions, environments, job outputs and reusable workflows, is listed in a comment block at the top of the file with the job and step it came from.
How are GitHub secrets handled?
A reference like ${{ secrets.NPM_TOKEN }} becomes $(NPM_TOKEN). Azure never passes secret variables to scripts on its own, so any env entry that reads a secret is mapped into the env: of each step that needs it. You still have to create the secrets in Azure DevOps, either as secret pipeline variables or in a variable group. secrets.GITHUB_TOKEN becomes $(System.AccessToken), which talks to Azure DevOps rather than GitHub.
What happens to ${{ github.sha }} and other expressions?
Azure reads ${{ }} as its own template syntax and would reject GitHub contexts, so common ones are rewritten: github.sha becomes $(Build.SourceVersion), github.ref becomes $(Build.SourceBranch), matrix.node becomes $(node), and if: conditions turn into Azure condition: expressions such as and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')). Expressions it can't translate are left as typed and named in the notes, so you know exactly where to look.
Will values like long IDs, zip codes or dates change?
No. Script text and env values keep the exact characters you typed, so 8901240544102066246, 00501, 14.50, yes and 2024-01-15 come out unchanged. Values a YAML reader could turn into a number, boolean or date are quoted in the pipeline.
Why do some jobs start with checkout: none?
Azure checks out your repository at the start of every job unless you tell it not to, while GitHub only does it when a step uses actions/checkout. Jobs that never checked out the code on GitHub get checkout: none so they behave the same way.
Can I use self-hosted agents like GitHub self-hosted runners?
Yes. A self-hosted runs-on becomes pool: name: Default, which is the self-hosted pool every Azure DevOps organization starts with. Change the name to your own pool and install the Azure Pipelines agent on the machines you want to use.
Is my workflow uploaded anywhere?
No. The conversion happens in your browser; nothing is sent to a server or kept, and a reload brings back an empty editor.
Going the other way? The Azure Pipelines to GitHub Actions converter does the reverse, and the same workflow can also become a GitLab CI, CircleCI or Travis CI config.
Related Tools
Jenkins to GitHub Actions
Convert Jenkins pipelines (Jenkinsfile) to GitHub Actions workflows — stages, parallel stages, when-conditions, post blocks and environment become jobs and steps, and anything it can't convert is listed in notes
GitLab CI to GitHub Actions
Convert GitLab CI/CD pipelines to GitHub Actions workflows with jobs, artifacts, and variables
CI/CD Pipeline Fixer
Fix broken CI/CD pipeline configurations automatically, repair GitHub Actions, GitLab CI, Jenkins, and Azure Pipelines YAML errors
CircleCI to GitHub Actions
Convert CircleCI config.yml to GitHub Actions workflows with jobs, caching, and artifacts
Azure Pipelines to GitHub Actions
Convert Azure Pipelines YAML to GitHub Actions workflows with jobs, tasks, and stages
Travis CI to GitHub Actions
Convert .travis.yml to GitHub Actions workflows with language support, caching, and lifecycle hooks