Friday, August 20, 2021

Convert Azure DevOps YAML pipeline to GitHub Action Pipeline

GitHub is the widely used open-source code platform in modern tech world. Many companies started moving the repos and the pipelines to GitHub. If you are already using Azure DevOps YAML pipelines there is good documentation available here providing you with instructions to migrate your pipelines to GitHub Actions. But for you to get started quickly, the migrate Azure DevOps YAML pipelines to GitHub Actions YAML using a converter tool would come in handy. AS mentioned in the converter, the migration tool has approximately ~90% accuracy, depending on the YAML tasks.

Pre- requisites: Azure DevOps YAML pipeline

Go to https://pipelinestoactions.azurewebsites.net/

Copy Azure DevOps YAML pipeline script to relevant box as mentioned in converter and click on process YAML button. Converted YAML script will be displayed under GitHub Actions YAML box.



Azure DevOps YAML script

trigger:
  branches:
    include:
    - master
  paths:
    include:
    - App1

pool:
  vmImage'ubuntu-latest'

variables:
  buildConfiguration'Release'

steps:
taskUseDotNet@2
  displayName'Use .Net Core sdk 2.2.402'
  inputs:
    version2.2.402
taskDotNetCoreCLI@2
  displayName'dotnet build'
  inputs:
    projects'App1/*.csproj'
    arguments'--configuration $(buildConfiguration)'


You can copy the converted GitHub Actions YAML pipeline to relevant GitHub project and do the required amendments such as selecting correct branch.


This blog explains how to convert Azure DevOps YAML pipeline to GitHub Actions pipeline using a tool to get started quickly.





No comments:

Post a Comment