Skip to main content
In this guide, we’ll transform a simple, single-job GitHub Actions workflow into a robust multi-job CI/CD pipeline. You’ll learn how to split build, test, and deploy stages into separate jobs, ensure proper sequencing, and share artifacts between steps.

Table of Contents

  1. Recap: Single-Job Workflow
  2. Multi-Job Workflow Setup
  3. Default Parallel Execution & Failures
  4. Common Errors
  5. Issues to Address Next
  6. References

Recap: Single-Job Workflow

Our original workflow ran every step in one job:
This approach is simple but not scalable. Everything—from installation to deployment—occurs in a single VM instance.

Multi-Job Workflow Setup

Below is an improved workflow with three distinct jobs: build_job_1, test_job_2, and deploy_job_3. Each job runs on its own runner:

Job Overview


Default Parallel Execution & Failures

By default, GitHub Actions runs jobs in parallel on separate VMs. Since there’s no shared filesystem or enforced order, downstream jobs may start before the build completes.
The image shows a GitHub Actions workflow summary with three jobs: "build_job_1" succeeded, while "test_job_2" and "deploy_job_3" failed, resulting in an overall workflow failure.
Jobs in GitHub Actions are isolated by default. To share files or enforce ordering, you’ll need to use job dependencies and artifacts.

Common Errors

When jobs run in parallel without dependencies, you may see errors like:

Issues to Address Next

  1. Job Sequencing
    Ensure build_job_1 completes before test_job_2, and test_job_2 before deploy_job_3 using the needs keyword.
  2. Artifact Sharing
    Use actions/upload-artifact in the build job and actions/download-artifact in downstream jobs to pass dragon.txt.

References

Watch Video