needs
The job key that makes a job wait until the jobs it names have finished successfully.
In more detail
Each needs entry is an edge in a graph of jobs, so jobs without needs run at the same time and a job with needs runs after its dependencies. A job may read the outputs of the jobs it needs through the needs context.
Example
package:
needs: [test, lint]Related terms
- job (GitHub Actions) — A named group of steps in a workflow that runs on one runner of its own.
- directed acyclic graph — A directed graph with no cycles, so following edges can never bring you back to where you started.
- job output — A small string a job publishes in its outputs block so that jobs which need it can read it.
Taught in
- Workflows, Jobs, Steps, and Actions — Continuous Integration & Continuous Delivery Pipelines
- Passing Data Between Jobs: Artifacts — Continuous Integration & Continuous Delivery Pipelines
- Environment Protection and Manual Approvals — Continuous Integration & Continuous Delivery Pipelines
- The Workflow That Ran On A Stranger's Pull Request — GitHub Actions (GH-200) Exam Prep
- How GH-200 Asks: Pacing, Weights And Stems — GitHub Actions (GH-200) Exam Prep
- Triggers In Depth: Filters, Schedules And Dispatch — GitHub Actions (GH-200) Exam Prep
- Workflow Structure: Jobs, Env, Services, Commands And Anchors — GitHub Actions (GH-200) Exam Prep
- Expressions, Contexts And The If That Is Always True — GitHub Actions (GH-200) Exam Prep
- Matrices, Needs And Concurrency: The Shape Of A Run — GitHub Actions (GH-200) Exam Prep
- Reusable Workflows: Inputs, Secrets And Outputs Across A Call — GitHub Actions (GH-200) Exam Prep
- Outputs, Artifacts, Caches And Job Summaries — GitHub Actions (GH-200) Exam Prep
- Why It Ran, Why It Did Not: Reading Runs, Jobs And Checks — GitHub Actions (GH-200) Exam Prep
- Failed Runs: Debug Logging And Re-Running The Right Jobs — GitHub Actions (GH-200) Exam Prep
- Logs And Artifacts Without The Browser: REST And The gh CLI — GitHub Actions (GH-200) Exam Prep
- Workflow Templates: Sharing Workflows Across An Organization — GitHub Actions (GH-200) Exam Prep
- Three Kinds Of Action: JavaScript, Docker Container Or Composite — GitHub Actions (GH-200) Exam Prep
- action.yml: Inputs, Outputs, Runs And Branding — GitHub Actions (GH-200) Exam Prep
- Building And Debugging A JavaScript Action — GitHub Actions (GH-200) Exam Prep
- Composite And Docker Actions: Troubleshooting And Immutable Releases — GitHub Actions (GH-200) Exam Prep
- GitHub-Hosted And Larger Runners: Specs, Software And Networks — GitHub Actions (GH-200) Exam Prep
- Self-Hosted Runners At Scale: Labels, Groups And ARC — GitHub Actions (GH-200) Exam Prep
- Secrets And Variables By Scope: Precedence, Access And The REST API — GitHub Actions (GH-200) Exam Prep
- GITHUB_TOKEN: Least Privilege, Job By Job — GitHub Actions (GH-200) Exam Prep
- Environments: Reviewers, Wait Timers And Deployment Rules — GitHub Actions (GH-200) Exam Prep
- OIDC: Cloud Access Without Stored Keys — GitHub Actions (GH-200) Exam Prep
- Supply Chain: Pinning, Trusted Actions And Attestations — GitHub Actions (GH-200) Exam Prep
- YAML-Reading Sprint: What Happens When This Runs? — GitHub Actions (GH-200) Exam Prep
- Full Mock And Review: Where Your Points Go — GitHub Actions (GH-200) Exam Prep