Understanding how to organize and run your automation tasks

What is a Job?

Think of a job as a unit of work - like a single task on your to-do list that needs to be completed. In GitHub Actions, jobs are the main building blocks that actually DO the work.

Simple analogy: If your workflow is like a construction project, then jobs are like different work crews (plumbing crew, electrical crew, painting crew) that each handle specific tasks.

name: My Workflow
on: [push]
jobs:           # This is where all the actual work is defined
  build:        # Job 1: Build the application
    # job details...
  test:         # Job 2: Run tests  
    # job details...
  deploy:       # Job 3: Deploy to production
    # job details...

🎯 Job Structure Breakdown

Every job has the same basic structure:

jobs:
  job_name:              # 1. Job ID (you choose this name)
    runs-on: ubuntu-latest  # 2. What computer to run on
    steps:                 # 3. List of tasks to do
      - name: Step 1
        run: echo "Hello"
      - name: Step 2
        run: echo "World"

Let's break down each part:

1. Job ID (job_name)

jobs:
  build-app:        # ✅ Good job name
  run_tests:        # ✅ Good job name  
  Deploy-Production: # ❌ Bad (uppercase)

2. Runner (runs-on)

jobs:
  my-job:
    runs-on: ubuntu-latest# Fresh Linux computer for this job

3. Steps