Automation using GitHub Actions

Avina Jain
Avina’s blog
Published in
2 min readFeb 2, 2021

========================================

In this article, we will talk about GitHub Actions and how they can be used to configure CI/CD pipelines directly on GitHub so you can automate your DevOps processes on GitHub itself instead of using any tool like Jenkins, Azure DevOps, etc.

I feel that the biggest advantage of using Actions and workflows is not needing to import your GitHub repositories to such tools, avoiding overheads of creating web-hooks, service endpoints or using some extensions for the same, which in turn will help in reducing time, effort, and security related issues.

Once you create a new repository and check-in your code on GitHub, you can go with any of the three options listed below to help you set up CI/CD pipelines -

  1. GitHub Actions will analyze your repository for the kind of project you have checked-in and will accordingly recommend a workflow. Those are called starter workflows. For example, if you are trying to build a node-based application, you might be suggested a workflow that will build and push a node.js application to an Azure Web App when a release is created. You can use these templates as-is if they suit your needs.
    To demonstrate this, I just created a new empty repository and it suggested me a Simple workflow
Simple workflow
Simple workflow

2. The second option would be to modify the same starter workflow you choose in case you have additional steps or any test to be run. You can add additional Featured Actions or third-party actions from the marketplace for the same.
For example, you can add Upload a Build Artifact action which uploads artifacts from your workflow allowing you to share data between jobs and store data once a workflow is complete.

3. You can skip selecting a workflow template and set up a workflow yourself. This will just create a YAML file with a basic workflow to help you get started with Actions, and then again, you can customize the file based on how you want to build/test your application or publish any packages. You will see the option as below -

Set up a workflow yourself
Set up a workflow yourself

You can look and search for all the available Actions on the below link -
https://github.com/marketplace?type=actions

========================================

I hope you find this article helpful! 😃

--

--