GitHub Actions: Go With the Workflow
Continuous Integration and Continuous Deployment (CI/CD) is great in theory but like its Agile and DevOps companions it is not the easiest thing to put into practice.
GitHub Actions, introduced in the past year, are intended to make CI/CD easier for developer teams to implement. If you are struggling to keep your DevOps culture on track and make Agile work, it might be worth seeing if GitHub Actions can help. At least, GitHub and its new Microsoft owners sure hope so. Since Microsoft purchased San Francisco-based GitHub in 2018, some of the Redmond, Washington technology and marketing magic seems to have infused the company.
In the Visual Studio community there were once rumors that GitHub actually slowed things down. But now the Microsoft-owned company is aggressively touting robustly named Actions as a way to keep Agile workflows rolling.
Understanding Actions
GitHub Actions comes in the form of an API, which can be used to orchestrate any workflow, and support CI/CD, as explained in this Visual Studio magazine article. Microsoft promised that Actions would “let developers and others orchestrate workflows based on events and then let GitHub take care of the execution and details,” explained Converge360 editor David Ramel. “These workflows or pipelines can be just about anything to do with automated software compilation and delivery, including building, testing and deploying applications, triaging and managing issues, collaboration and more.”
This orchestration tool is something like the mythical wrench that works for every job you have.
“GitHub Actions now makes it easier to automate how you build, test, and deploy your projects on any platform, including Linux, macOS, and Windows,” Microsoft said in introducing the CI/CD capabilities this past summer. “Run your workflows in a container or in a virtual machine. Actions also supports more languages and frameworks than ever, including Node.js, Python, Java, PHP, Ruby, C/C++, .NET, Android, and iOS. Testing multi-container apps? You can now test your Web service and its database together by simply adding some docker-compose to your workflow file.”
GitHub offers help for developers as they begin to use the new technology. For example, when Actions are enabled on a repository, GitHub will provide suggestions for appropriate workflows according to the project.
GitHub Actions for Azure
Almost simultaneously with the announcement of the CI/CD capabilities, Microsoft also announced GitHub Actions for Azure with more support for developers new to Actions.
"You can find our first set of Actions grouped into four repositories on GitHub,” Microsoft said, “each one containing documentation and examples to help you use GitHub for CI/CD and deploy your apps to Azure." The initial list of repositories to check out included:
- azure/actions (login): Authenticate with an Azure subscription.
- azure/appservice-actions: Deploy apps to Azure App Services using the features Web Apps and Web Apps for Containers.
- azure/container-actions: Connect to container registries, including Docker Hub and Azure Container Registry, as well as build and push container images.
- azure/k8s-actions: Connect and deploy to a Kubernetes cluster, including Azure Kubernetes Service (AKS).
Getting Started with GitHub Actions at Microsoft HQ
If you want to get down to the nitty gritty with GitHub Actions, Mickey Gousset, DevOps Architect at Microsoft, is teaching a session on it at the Visual Studio Live! Microsoft HQ event this summer.
Gousset will show how GitHub Actions enables you to create custom software development lifecycle workflows directly in your GitHub repository. You can create tasks, called "actions", and combine them to create custom workflows to build, test, package, release and/or deploy any code project on GitHub. In this session you will learn the ins and outs of GitHub Actions, and walk away with workflows and ideas that you can start using in your own repos immediately.
You will learn:
- What GitHub Actions are and why you care
- How to build/release your GitHub repos using GitHub Actions
- Tips/tricks for your YAML files
Sign up for Visual Studio Live! Microsoft HQ today!
Posted by Richard Seeley on 03/24/2020