Until this point, the components we've talked about have been relatively supplementary to the actual unit of work we hope to achieve with a given workflow. It's not until we reach the point of defining jobs that we end up with tangible results.
Jobs, defined in the workflow, have two main purposes:
- Define the environment in which the subsequent steps will run
- Define one or more executable steps.
A major factor at the jobs level is defining the runner that the job will execute on. To decide the proper runner for your use case, you first need to decide where that runner will be hosted. You have two hosting option for runners:
For the purposes of this workshop we will be focusing on GitHub Hosted Runners.
📖For more on insight on the administration of self-hosted runners, see the section Opting for Self-hosted Runners.
GiHub Hosted | Self Hosted |
---|---|
|
|
Defining a runner is quite easy, and can be done so by specifying the desired runner within the jobs section of the workflow.
runs-on: ubuntu-latest
📖See a full list of runners and their environments