What are GitHub Actions Workflow, Job, Step, and Action#
Want to understand what workflow, job, step, and action are in GitHub Actions? Let's start by going over the official definitions.
“A configurable automated process that you can set up in your repository to build, test, package, release, or deploy any project on GitHub. Workflows are made up of one or more jobs and can be scheduled or activated by an event.”
“A defined task made up of steps. Each job is run in a fresh instance of the virtual environment. You can define the dependency rules for how jobs run in a workflow file. Jobs can run at the same time in parallel or be dependent on the status of a previous job and run sequentially. For example, a workflow can have two sequential jobs that build and test code, where the test job is dependent on the status of the build job. If the build job fails, the test job will not run.”
“A step is a set of tasks performed by a job. Each step in a job executes in the same virtual environment, allowing the actions in that job to share information using the filesystem. Steps can run commands or actions.”
“Individual tasks that you combine as steps to create a job. Actions are the smallest portable building block of a workflow. You can create your own actions, use actions shared from the GitHub community, and customize public actions. To use an action in a workflow, you must include it as a step.”
If the offical definitions helped you understand the whole concept, great! If not, here is my summary, hope it helps you.
A workflow is a predefined set of operations that are performed in response to one or more GitHub events. Each workflow is composed of a series of dependent or independent jobs, where each step of the job may be an action s (invoked with uses) or the operating system command (executed with run).