SlideShare a Scribd company logo
Using GitHub Actions to Deploy Your
Workloads to Azure
Kasun Kodagoda
Technical Lead | 99X Technology
https://kasunkodagoda.com
♥
I am, Kasun Kodagoda
• In ♥ with Azure & Azure DevOps
• Active Blogger – https://kasunkodagoda.com
• Open Source Contributor - https://github.com/kasunkv
• Technical Lead
I Work For,
• Established in 2004
• Headquartered in Sri Lanka with offices in
Europe and Australia
• Providing high quality, high value Software
Product Engineering + R&D services
Agenda
• Basics of GitHub Actions
• Core Concepts
• GitHub Actions for Azure
• Demo
What are GitHub Actions
• Made up of individual tasks called Actions
• Collection of actions performs a certain
activity
• This collection is called a workflow
These Workflows helps you automate your software
development activities in the same place where you store
your source code
Core Concepts
Action
• Smallest building block of a workflow
• Individual task that performs a specific
activity in a workflow
• Two Types of Actions
• JavaScript Actions
- Hosted on a public repository
• Docker Actions
- Hosted on a public docker registry
Artifacts
• Output of a workflow
• Can include,
• A set of files (e.g. files of a web app)
• Test results
• Log files
• Screenshots etc.
• Can be shared with other jobs or be
deployed
Event
• Activity that can trigger a workflow run
• An event can have multiple activity types
• Could be any GitHub event
• push
• pull_request
• create
• delete
• issue_comment
• created
• edited
• deleted
https://help.github.com/en/actions/reference/events-that-trigger-workflows
Job
• Set of steps that gets executed on the
same runner.
• In a single workflow, there can be multiple
jobs
• Can have dependencies between jobs in a
workflow file
- job_1
- job_2
- job_3
job_2 can depend on job_1. job_3 can depend on jod_2
Job Strategy
• Creates a build matrix for the jobs
• Define different variations of the
environment
• Run the job on build matrix at the same
time.
strategy:
matrix:
node: [6, 8, 10]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
Workflow
• Configurable automated process
• Contained in the repository
• In .github/workflows directory
• Made up of one or more jobs
• Triggered by an event or a schedule
• Described in a YAML file
• Must contain at least one job
Workflow Run
• Instance of a workflow
• Runs when the trigger event occurs
• E.g. pull_request, push
• You can see;
• Execution logs
• Status and results
• Artifacts
Runners
• GitHub hosted virtual environments that
run workflows
• All 3 major OS platforms are supported
• Windows
- Runs Windows Server 2019
- windows-latest or windows-2019
• Linux
- Runs Ubuntu 16.04 and 18.04
- ubuntu-latest or ubuntu-18.04 and ubuntu-16.04
• MacOS
- Runs MacOS Catalina 10.15
- macos-latest or macos-10.15
Runners – ctd.
• Two types of runners available
• GitHub Hosted
• Automatically updated
• Managed and maintained by GitHub
• Clean instance for every job execution
• Free minutes/rates will be applied depending on the plan
• Self-Hosted
• Local or any cloud infrastructure you own
• You pay for your own infrastructure
• You can customize with hardware, software & tools you want
• No need to have a clean instance for each job execution
• No rates are applied, free to you.
• You need to maintain your environments
Runners – ctd.
• Linux and Windows VMs are hosted in
Azure
• Standard_DS2_v2 sku
• Based on the Azure Pipelines Agent
• MacOS VMs are hosted in MacStadium
https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners
Usage Limits
• Job Execution Time
• GitHub Hosted – 6 hrs
• Self-Hosted – Unlimited
• Workflow Run Time
• GitHub Hosted, Self-Hosted – 72 hrs
• Job Queue Time
• GitHub Hosted – Not Applicable
• Self-Hosted – 24 hrs
• Job Matrix
• GitHub Hosted, Self Hosted – Max. 256 Jobs per
workflow
Usage Limits – ctd.
• API Requests
• 1000 Requests per Hour
• Across all actions for a single repository
• Both GitHub Hosted and Self-Hosted.
• Concurrent Jobs
Plan Total Concurrent Jobs Max. Concurrent macOS Jobs
Free 20 5
Pro 40 5
Team 60 5
Enterprise 180 50
GitHub Marketplace
• Central location to find GitHub Actions
• Created by official organizations and the
community
• Accessible through the workflow editor
GitHub Actions for Azure
GitHub Actions for Azure
• Set of actions to access Azure Services
• Azure cloud resources
• Azure Pipelines builds and releases
• Deploy workloads to Azure cloud from
workflows
• Some of the widely used Azure services
are accessible
• More on the way
Connecting to Azure
• Azure Login
• azure/login
• Authenticate to Azure using a service principle
• Azure CLI
• azure/cli
• Configures the runner with the latest or specified version
of the Azure CLI
• Run Azure CLI scripts to manage Azure Resources
Azure Web Apps
• Azure Web App
• azure/webapps-deploy
• Deploy your web site artifacts to Azure Web Apps
• Azure Web App for Containers
• azure/webapps-container-deploy
• Deploy your web app, packaged as a container to Azure
Web Apps.
• Azure App Service Settings
• azure/appservice-settings
• Configure App Settings and Connection string on Azure
App Service .
Azure Function Apps
• Azure Functions
• azure/functions-action
• Deploy your serverless code to an Azure Function App
• Azure Functions for Containers
• azure/functions-container-action
• Deploy your custom container image to Azure Functions
App.
Azure Kubernetes Services
• Kubectl Tools Installer
• azure/setup-kubectl
• Installs specific version of kubectl on the runner
• AKS Set Context
• azure/aks-set-context
• Set the Kubernetes cluster context on AKS
• Kubernetes Deploy
• azure/k8s-deploy
• Deploy manifests to the Kubernetes cluster
Azure Kubernetes Services – ctd.
• Setup Help
• azure/setup-helm
• Installs specific version of Helm on the runner
• Kubernetes Create Secret
• azure/k8s-create-secret
• Create secret on Kubernetes cluster
• More Actions…
• https://github.com/Azure/actions#deploy-to-
kubernetes
Azure Databases
• Azure SQL Databse
• azure/sql-action
• Deploy DACPAC and SQL Scripts to Azure SQL Database
• Uses a connection string to authenticate
• Azure MySQL Database
• azure/mysql-action
• Deploy MySQL databases using SQL Scripts
• Uses a connection string to authenticate
Few More…
• Azure Pipelines
• azure/pipelines
• Trigger Azure Pipeline run as part of the workflow
• Docker Login
• azure/docker-login
• Push containers to Docker Hub or Azure Container
Registry
• Get Secret from Azure Key Vault
• azure/get-keyvault-secret
• Fetch one or more Key Vault secrets.
https://github.com/Azure/actions
Let’s See it in Action
Thank You :)
Any Questions? ;)
Sample Code
https://github.com/kasunkv/
Slide Deck
https://www.slideshare.net/KasunKodagoda1
Blog Posts
https://kasunkodagoda.com/tag/azure/
Connect With Me
Twitter: https://twitter.com/kasun_kodagoda
Facebook: https://www.facebook.com/kasun.kodagoda
LinkedIn: https://www.linkedin.com/in/kasunkodagoda/
Blog: https://kasunkodagoda.com/
http://bit.ly/github-actions-sl-devops-community

More Related Content

PPTX
CICD Pipeline Using Github Actions
PDF
DevOps with GitHub Actions
PDF
Gitops: the kubernetes way
PDF
Gitops Hands On
PDF
Introduction to GitHub Actions
PDF
CI/CD with Github Actions
PPTX
CI/CD with GitHub Actions
PDF
GitHub Actions in action
CICD Pipeline Using Github Actions
DevOps with GitHub Actions
Gitops: the kubernetes way
Gitops Hands On
Introduction to GitHub Actions
CI/CD with Github Actions
CI/CD with GitHub Actions
GitHub Actions in action

What's hot (20)

PDF
Intro to Github Actions @likecoin
PDF
Introduction to CICD
PDF
Introduction to GitHub Actions
PDF
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
PPTX
Github in Action
PDF
Kubernetes dealing with storage and persistence
PDF
Introduction to Github Actions
PPTX
CI/CD Overview
PPSX
CI-CD Jenkins, GitHub Actions, Tekton
PPTX
GitOps w/argocd
PPTX
Azure kubernetes service (aks)
PDF
Azure DevOps - Azure Guatemala Meetup
PDF
Gitlab, GitOps & ArgoCD
PPT
CI and CD with Jenkins
PPTX
Kubernetes 101 for Beginners
PPTX
Introduction to Kubernetes
PDF
Welcome to Azure Devops
PDF
CD using ArgoCD(KnolX).pdf
PDF
GitHub Actions with Node.js
PDF
GitOps 101 Presentation.pdf
Intro to Github Actions @likecoin
Introduction to CICD
Introduction to GitHub Actions
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Github in Action
Kubernetes dealing with storage and persistence
Introduction to Github Actions
CI/CD Overview
CI-CD Jenkins, GitHub Actions, Tekton
GitOps w/argocd
Azure kubernetes service (aks)
Azure DevOps - Azure Guatemala Meetup
Gitlab, GitOps & ArgoCD
CI and CD with Jenkins
Kubernetes 101 for Beginners
Introduction to Kubernetes
Welcome to Azure Devops
CD using ArgoCD(KnolX).pdf
GitHub Actions with Node.js
GitOps 101 Presentation.pdf
Ad

Similar to Using GitHub Actions to Deploy your Workloads to Azure (20)

PPTX
AKS Azure Kubernetes Services - Azure Nights melbourne feb 2018
PPTX
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
PPTX
Kudu voodoo slideshare
PPTX
habitat at docker bud
PPTX
Power of Azure Devops
PPTX
Building API in the cloud using Azure Functions
PPTX
Era of server less computing
PPTX
Play with azure functions
PDF
Develop Azure compute solutions Part - 2
PPTX
GitOps_Without_K8s_Training_Updated_Ansible_Terraform_Docker.pptx
PPTX
Era of server less computing final
PPTX
DevNexus 2015: Kubernetes & Container Engine
PPTX
A Million ways of Deploying a Kubernetes Cluster
PDF
Individual Serverless Development Environments for AWS
PDF
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
PDF
Cocoapods in action
PDF
Continuous Deployment with Kubernetes, Docker and GitLab CI
PDF
Automated Deployment and Configuration Engines. Ansible
PPTX
Open service broker API with Azure Kubernetes Services
PDF
Pro2516 10 things about oracle and k8s.pptx-final
AKS Azure Kubernetes Services - Azure Nights melbourne feb 2018
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Kudu voodoo slideshare
habitat at docker bud
Power of Azure Devops
Building API in the cloud using Azure Functions
Era of server less computing
Play with azure functions
Develop Azure compute solutions Part - 2
GitOps_Without_K8s_Training_Updated_Ansible_Terraform_Docker.pptx
Era of server less computing final
DevNexus 2015: Kubernetes & Container Engine
A Million ways of Deploying a Kubernetes Cluster
Individual Serverless Development Environments for AWS
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Cocoapods in action
Continuous Deployment with Kubernetes, Docker and GitLab CI
Automated Deployment and Configuration Engines. Ansible
Open service broker API with Azure Kubernetes Services
Pro2516 10 things about oracle and k8s.pptx-final
Ad

More from Kasun Kodagoda (15)

PPTX
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...
PPTX
Get On Top of Azure Resource Security Using Secure DevOps Kit for Azure
PPTX
Centralized Configuration Management for the Cloud with Azure App Configuration
PPTX
Serverless in the Azure World
PPTX
Role of Test Automation in Modern Software Delivery Pipelines
PPTX
Demystifying Azure Certifications
PPTX
Good Bye Credentials in Code, Welcome Azure Managed Identities
PPTX
DevOps: Why Should We Care?
PPTX
Introduction to Microsoft Azure
PPTX
Building Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDK
PPTX
Building a Continuous Delivery Pipeline With Visual Studio
PPTX
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
PPTX
Making Money with Technology
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
PPTX
Monetizing Windows Phone Apps
Feature Toggle for .Net Core Apps on Azure with Azure App Configuration Featu...
Get On Top of Azure Resource Security Using Secure DevOps Kit for Azure
Centralized Configuration Management for the Cloud with Azure App Configuration
Serverless in the Azure World
Role of Test Automation in Modern Software Delivery Pipelines
Demystifying Azure Certifications
Good Bye Credentials in Code, Welcome Azure Managed Identities
DevOps: Why Should We Care?
Introduction to Microsoft Azure
Building Custom Visual Studio Team Service Build Tasks With VSTS DevOps Task SDK
Building a Continuous Delivery Pipeline With Visual Studio
Going Serverless with Azure Functions #1 - Introduction to Azure Functions
Making Money with Technology
Better End-to-End Testing with Page Objects Model using Protractor
Monetizing Windows Phone Apps

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Machine learning based COVID-19 study performance prediction
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Cloud computing and distributed systems.
NewMind AI Weekly Chronicles - August'25 Week I
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Digital-Transformation-Roadmap-for-Companies.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Network Security Unit 5.pdf for BCA BBA.
Machine learning based COVID-19 study performance prediction
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Cloud computing and distributed systems.

Using GitHub Actions to Deploy your Workloads to Azure

  • 1. Using GitHub Actions to Deploy Your Workloads to Azure Kasun Kodagoda Technical Lead | 99X Technology https://kasunkodagoda.com ♥
  • 2. I am, Kasun Kodagoda • In ♥ with Azure & Azure DevOps • Active Blogger – https://kasunkodagoda.com • Open Source Contributor - https://github.com/kasunkv • Technical Lead I Work For, • Established in 2004 • Headquartered in Sri Lanka with offices in Europe and Australia • Providing high quality, high value Software Product Engineering + R&D services
  • 3. Agenda • Basics of GitHub Actions • Core Concepts • GitHub Actions for Azure • Demo
  • 4. What are GitHub Actions • Made up of individual tasks called Actions • Collection of actions performs a certain activity • This collection is called a workflow These Workflows helps you automate your software development activities in the same place where you store your source code
  • 6. Action • Smallest building block of a workflow • Individual task that performs a specific activity in a workflow • Two Types of Actions • JavaScript Actions - Hosted on a public repository • Docker Actions - Hosted on a public docker registry
  • 7. Artifacts • Output of a workflow • Can include, • A set of files (e.g. files of a web app) • Test results • Log files • Screenshots etc. • Can be shared with other jobs or be deployed
  • 8. Event • Activity that can trigger a workflow run • An event can have multiple activity types • Could be any GitHub event • push • pull_request • create • delete • issue_comment • created • edited • deleted https://help.github.com/en/actions/reference/events-that-trigger-workflows
  • 9. Job • Set of steps that gets executed on the same runner. • In a single workflow, there can be multiple jobs • Can have dependencies between jobs in a workflow file - job_1 - job_2 - job_3 job_2 can depend on job_1. job_3 can depend on jod_2
  • 10. Job Strategy • Creates a build matrix for the jobs • Define different variations of the environment • Run the job on build matrix at the same time. strategy: matrix: node: [6, 8, 10] steps: - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node }}
  • 11. Workflow • Configurable automated process • Contained in the repository • In .github/workflows directory • Made up of one or more jobs • Triggered by an event or a schedule • Described in a YAML file • Must contain at least one job
  • 12. Workflow Run • Instance of a workflow • Runs when the trigger event occurs • E.g. pull_request, push • You can see; • Execution logs • Status and results • Artifacts
  • 13. Runners • GitHub hosted virtual environments that run workflows • All 3 major OS platforms are supported • Windows - Runs Windows Server 2019 - windows-latest or windows-2019 • Linux - Runs Ubuntu 16.04 and 18.04 - ubuntu-latest or ubuntu-18.04 and ubuntu-16.04 • MacOS - Runs MacOS Catalina 10.15 - macos-latest or macos-10.15
  • 14. Runners – ctd. • Two types of runners available • GitHub Hosted • Automatically updated • Managed and maintained by GitHub • Clean instance for every job execution • Free minutes/rates will be applied depending on the plan • Self-Hosted • Local or any cloud infrastructure you own • You pay for your own infrastructure • You can customize with hardware, software & tools you want • No need to have a clean instance for each job execution • No rates are applied, free to you. • You need to maintain your environments
  • 15. Runners – ctd. • Linux and Windows VMs are hosted in Azure • Standard_DS2_v2 sku • Based on the Azure Pipelines Agent • MacOS VMs are hosted in MacStadium https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners
  • 16. Usage Limits • Job Execution Time • GitHub Hosted – 6 hrs • Self-Hosted – Unlimited • Workflow Run Time • GitHub Hosted, Self-Hosted – 72 hrs • Job Queue Time • GitHub Hosted – Not Applicable • Self-Hosted – 24 hrs • Job Matrix • GitHub Hosted, Self Hosted – Max. 256 Jobs per workflow
  • 17. Usage Limits – ctd. • API Requests • 1000 Requests per Hour • Across all actions for a single repository • Both GitHub Hosted and Self-Hosted. • Concurrent Jobs Plan Total Concurrent Jobs Max. Concurrent macOS Jobs Free 20 5 Pro 40 5 Team 60 5 Enterprise 180 50
  • 18. GitHub Marketplace • Central location to find GitHub Actions • Created by official organizations and the community • Accessible through the workflow editor
  • 20. GitHub Actions for Azure • Set of actions to access Azure Services • Azure cloud resources • Azure Pipelines builds and releases • Deploy workloads to Azure cloud from workflows • Some of the widely used Azure services are accessible • More on the way
  • 21. Connecting to Azure • Azure Login • azure/login • Authenticate to Azure using a service principle • Azure CLI • azure/cli • Configures the runner with the latest or specified version of the Azure CLI • Run Azure CLI scripts to manage Azure Resources
  • 22. Azure Web Apps • Azure Web App • azure/webapps-deploy • Deploy your web site artifacts to Azure Web Apps • Azure Web App for Containers • azure/webapps-container-deploy • Deploy your web app, packaged as a container to Azure Web Apps. • Azure App Service Settings • azure/appservice-settings • Configure App Settings and Connection string on Azure App Service .
  • 23. Azure Function Apps • Azure Functions • azure/functions-action • Deploy your serverless code to an Azure Function App • Azure Functions for Containers • azure/functions-container-action • Deploy your custom container image to Azure Functions App.
  • 24. Azure Kubernetes Services • Kubectl Tools Installer • azure/setup-kubectl • Installs specific version of kubectl on the runner • AKS Set Context • azure/aks-set-context • Set the Kubernetes cluster context on AKS • Kubernetes Deploy • azure/k8s-deploy • Deploy manifests to the Kubernetes cluster
  • 25. Azure Kubernetes Services – ctd. • Setup Help • azure/setup-helm • Installs specific version of Helm on the runner • Kubernetes Create Secret • azure/k8s-create-secret • Create secret on Kubernetes cluster • More Actions… • https://github.com/Azure/actions#deploy-to- kubernetes
  • 26. Azure Databases • Azure SQL Databse • azure/sql-action • Deploy DACPAC and SQL Scripts to Azure SQL Database • Uses a connection string to authenticate • Azure MySQL Database • azure/mysql-action • Deploy MySQL databases using SQL Scripts • Uses a connection string to authenticate
  • 27. Few More… • Azure Pipelines • azure/pipelines • Trigger Azure Pipeline run as part of the workflow • Docker Login • azure/docker-login • Push containers to Docker Hub or Azure Container Registry • Get Secret from Azure Key Vault • azure/get-keyvault-secret • Fetch one or more Key Vault secrets. https://github.com/Azure/actions
  • 28. Let’s See it in Action
  • 29. Thank You :) Any Questions? ;)
  • 30. Sample Code https://github.com/kasunkv/ Slide Deck https://www.slideshare.net/KasunKodagoda1 Blog Posts https://kasunkodagoda.com/tag/azure/ Connect With Me Twitter: https://twitter.com/kasun_kodagoda Facebook: https://www.facebook.com/kasun.kodagoda LinkedIn: https://www.linkedin.com/in/kasunkodagoda/ Blog: https://kasunkodagoda.com/ http://bit.ly/github-actions-sl-devops-community