ii
Contents
Compare and contrast GitHub Actions and Azure Pipelines .......................................................................... 35
Compare and contrast GitHub Actions and Azure Pipelines ............................................................................... 35
Pipelines as code .............................................................................................................................................................. 35
Agents and runners ......................................................................................................................................................... 35
Comparison of GitHub Actions and Azure Pipelines ......................................................................................... 37
Feature comparison ........................................................................................................................................................ 37
Recommendation table for common scenarios ....................................................................................................... 39
Build a .NET web app using GitHub Actions .............................................................................................................. 39
Workflow structure .......................................................................................................................................................... 40
Create a basic build workflow ..................................................................................................................................... 40
Dissect the workflow file ............................................................................................................................................... 44
Publish the output ........................................................................................................................................................... 45
Deploy a .NET web app using GitHub Actions .......................................................................................................... 48
Environments ..................................................................................................................................................................... 48
Azure authentication....................................................................................................................................................... 49
Add environments ........................................................................................................................................................... 51
Deploy to staging............................................................................................................................................................. 53
Deploy to production ..................................................................................................................................................... 56
Add a manual queue option ........................................................................................................................................ 60
Handle environment configuration........................................................................................................................... 61
Final workflow file ............................................................................................................................................................ 64
Secure .NET Code with CodeQL and GitHub Actions ............................................................................................. 66
Create the code scanning workflow ......................................................................................................................... 67
Customize CodeQL settings ......................................................................................................................................... 70
Review the security alerts ............................................................................................................................................. 71
Do'stlaringiz bilan baham: