This article will explain GitHub Actions alongside a practical example of running one GitHub Actions for Continuous Integration of a .NET 6 Web App.
The manual process of packaging and deploying your software is painful, takes a lot of time, and leads to errors. Usually, this manual process is described in a manual and executed by a human, and if any step is skipped or misunderstood then your deployed will probably face misbehavior in your software.
Using GitHub Actions can save precious time and energy for your team to have your software packed, tested, and deployed.
What is a GitHub Actions?
GitHub Actions is a powerful tool for CI and CD to automate your Software Development pipelines. With GitHub actions, you can automate your build, test, and deployment process without requiring manual intervention.
You can use GitHub Actions to track a repository branch and run a workflow every time its trigger is activated, or you can also start its workflow manually.
WorkFlows
A workflow is the macro piece of the automation process, it is in the workflow that we define the steps to be executed to automate the CI and, or, CD process.
The workflow is defined in a YAML file and split into 1-N jobs in the repositories, and a repository can have 0-N workflows. One workflow can be used as a step from another workflow and its execution can be triggered by a specified event, a specified schedule, or manually.
Events
Events are responsible to trigger a workflow in a repository, those events are going to be listening to the changes made into your repository and start the workflow as soon as one event is flagged as the workflow trigger.
Examples of events are: issue opened, pull request completed, commit pushed, POST to a Web API, etc.. You can find a list of all the events from the link below:
Jobs
A job is a set of ordered steps to be executed sequentially, or in parallel, by a runner, or a virtual machine. Those steps can be to execute a script defined by you or execute a pre-defined action.
If a job is executed sequentially it is because it depends on the successful execution of a previous job, otherwise, the jobs are running in parallel. By default, the jobs do not have any dependency and run in parallelism.
Actions
The actions are pre-defined tasks and are available to be used in your Workflows from GitHub Marketplace. With these actions, you can save time to perform a complex and repetitive task by reusing the same template used by many others projects and people.
If you do not find the action that best suits your needs, then you can write your own task and make it available to others through the GitHub Marketplace.
Runners
Runners are the platform that will be running your workflows, having the capacity to run a job at a time. If we compare it to Azure DevOps we have the Agents doing the same work as the GitHub Runners.
GitHub offers free runners on Ubuntu Linux, macO, and Microsoft Windows. If needed, you can host your own self-hosted runner with its specificities like operational system and hardware configuration.



Join the conversation! Your thoughts help the community grow.