Version Control · Flashcard

When two steps run in one job, what do they share?

  • AOne runner and its filesystem, so files persist between steps
  • BNothing at all, since every step is given a runner of its own
  • COne shell process, so exported variables survive by default
  • DOne log file only, as each step runs on a separate machine

Why this is the answer

A job is a unit of scheduling: its steps run in order on the same runner and workspace, which is why a checkout in step one is still there in step five. Each run: step is nevertheless a fresh shell, so an exported variable is lost unless you write it to $GITHUB_ENV.

Official docs
Study in Gnoseed →