How to Convert Azure Pipelines to GitHub Actions - Step by Step Guide
Input Your Azure Pipelines Configuration
Start with your existing Azure Pipelines YAML. Whether you're migrating to GitHub Actions, consolidating CI/CD tools, or evaluating platforms:
Example: Azure Pipelines Configuration
Here's what a typical Azure Pipeline looks like:
trigger:
branches:
include:
- main
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: Build
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
- script: npm install
- script: npm run build
- job: Test
dependsOn: Build
steps:
- script: npm testWhat Gets Mapped
Here is how the parts of your Azure Pipeline carry over. Anything not on this list, such as conditions, templates and variable groups, is named in a comment block at the top of the workflow:
Example: Converted GitHub Actions Workflow
The same pipeline transformed into GitHub Actions YAML:
name: CI Pipeline
'on':
push:
branches:
- main
pull_request: {}
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
- name: Run script
run: npm install
- name: Run script
run: npm run build
Test:
runs-on: ubuntu-latest
needs:
- Build
steps:
- uses: actions/checkout@v4
- name: Run script
run: npm testReview and Customize
Review the generated workflow and make necessary adjustments:
Deploy to GitHub
Save your workflow file and activate GitHub Actions:
.github/workflows/ directoryFrequently Asked Questions
What does the converter actually translate?
Branch, path and tag triggers become on: push and on: pull_request (excludes turn into "!pattern" entries), schedules keep their cron line, vmImage pools become ubuntu-latest, windows-latest or macos-latest, and a named agent pool becomes self-hosted. Variables become env, stages and jobs become jobs, dependsOn becomes needs, and script, bash, powershell and pwsh steps become run steps. Every job gets an actions/checkout step unless it says checkout: none.
Which Azure tasks turn into GitHub Actions?
NodeTool, UsePythonVersion, PublishBuildArtifacts, PublishPipelineArtifact, DownloadBuildArtifacts, DownloadPipelineArtifact and CopyFiles are mapped to setup, artifact or shell steps. NuGetCommand and MSBuild/VSBuild become dotnet restore and dotnet build. Any other task becomes a placeholder step that echoes a TODO, and it is named in the notes so you can pick a Marketplace action for it.
What happens to conditions, templates and variable groups?
They are not rewritten, because Azure expressions like succeeded() or eq(variables['Build.SourceBranch'], ...) have no direct GitHub form. Instead the workflow starts with a comment block that lists each condition, template, variable group, matrix strategy and any other key that was left out, with the stage, job or step it came from. Nothing is dropped silently.
Will variable values like long IDs, zip codes or dates change?
No. Every value is copied as text exactly as you typed it, so 8901240544102066246, 00501, 14.50, true, yes and 2024-01-15 come out unchanged. Values that a YAML reader would turn into a number, boolean or date are quoted, which is also how GitHub hands env values to your steps: as strings.
Why does my script still contain $(Build.BuildId)?
Script text is copied unchanged. Azure replaces $(Name) macros before the script runs, but GitHub does not, and bash reads $(...) as a command. When the converter spots these macros, or ${{ }} template expressions, it lists them in the notes so you can swap in $NAME or a github context value.
Is my pipeline uploaded anywhere?
No. The conversion runs in your browser and nothing is sent to a server or kept, so reloading the page starts you off with an empty editor.
Going the other way? The GitHub Actions to Azure Pipelines converter does the reverse, and there are converters for CircleCI and Jenkins too. For self-hosted runners, see GitHub's runner docs.
Related Tools
Jenkins to GitHub Actions
Convert Jenkins pipelines (Jenkinsfile) to GitHub Actions workflows with automatic step mapping
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
Travis CI to GitHub Actions
Convert .travis.yml to GitHub Actions workflows with language support, caching, and lifecycle hooks
GitHub Actions to GitLab CI
Convert GitHub Actions workflows to GitLab CI configuration with jobs, stages, and rules