Join us

Github Actions Workflows, Steps, and Jobs

You can automate your build, test, and deployment workflow using the continuous integration and continuous delivery (CI/CD) technology known as GitHub Actions.

You can automate your build, test, and deployment workflow using the continuous integration and continuous delivery (CI/CD) technology known as GitHub Actions. With Github Actions, You can design workflows that deploy merged pull requests to production or build and test each pull request before adding it to your repository.

Workflows

Just like humans can react or get triggered by an event in their memory, a current incident or encounter, or by an already set alarm. Workflows are triggered or prompted by an event in the repository, manually, or at an already set schedule.

However, events in this context are activities that can originate from GitHub when someone creates a pull request, opens an issue, or pushes a commit to a repository. Workflows are defined by a YAML file put into your repository and will run when triggered or prompted by the events mentioned above. As earlier said, they use YAML syntax and must have either a .yml or .yaml file extension.

A workflow is an automated process that can be configured to execute one or more jobs. It defines the order in which we will run jobs.

Jobs

A job is a series of workflow steps that run on the same runner. In simpler terms, a job is where we define the task to be done. Jobs in a workflow run in parallel. To specify that a job is dependent on another job to run before it runs, we can use “needs”. Its usage and further explanation are specified in the GitHub actions documentation linked here.

Steps

Let’s liken steps to a task list. Either a shell script will be run or action will be performed at each step. The steps are carried out sequentially and are interdependent. In other words, Steps are executed in the order they are written and are dependent on the previous step completed.

Illustration

The illustration below is of a GitHub action workflow that has 3 jobs that run parallel therein and each job has various steps in it. Job 1 has 4 steps that are run sequentially, job 2 has 3 steps that run sequentially and job 3 has 5 steps that run sequentially as well.

Conclusion

I hope you found this article helpful as I’ll appreciate your comments and I’ll be available to answer your questions on Twitter and Gmail via omoladeekpeni@gmail.com.


Only registered users can post comments. Please, login or signup.

Start blogging about your favorite technologies, reach more readers and earn rewards!

Join other developers and claim your FAUN account now!

Avatar

Omolade Ekpeni

@omolade
God’s very own | Devops | QA | Technical writer | Economist |❀
User Popularity
39

Influence

3k

Total Hits

1

Posts