Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 4.51 KB

File metadata and controls

41 lines (26 loc) · 4.51 KB

Jobs {docsify-ignore-all}

keywords availble at the jobs level

Executable tasks

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.

All about runners

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
  • Receive automatic updates for the operating system, preinstalled packages and tools, and the self-hosted runner application.
  • Are managed and maintained by GitHub.
  • Provide a clean instance for every job execution.
  • Use free minutes on your GitHub plan, with per-minute rates applied after surpassing the free minutes.
  • Receive automatic updates for the self-hosted runner application only. You are responsible updating the operating system and all other software.
  • Can use cloud services or local machines that you already pay for.
  • Are customizable to your hardware, operating system, software, and security requirements.
  • Don't need to have a clean instance for every job execution.
  • Are free to use with GitHub Actions, but you are responsible for the cost of maintaining your runner machines.

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