Skip to content
Latchkey

What Is a Job Output in GitHub Actions?

A job output is a value a job publishes so jobs that need it can read it via the needs context.

Jobs are isolated, so passing data between them needs a mechanism. Job outputs let one job expose values, like a computed version or image tag, that downstream jobs consume.

What it is

A named value declared in a job's outputs: map, sourced from a step output. Dependent jobs read it through needs.<job>.outputs.<name>.

Declaring a job output
jobs:
  build:
    runs-on: ubuntu-latest
    outputs:
      version: ${{ steps.v.outputs.version }}
    steps:
      - id: v
        run: echo "version=1.2.3" >> "${GITHUB_OUTPUT}"

How it works

A step writes a value to its step output; the job maps that to a job output; a downstream job that lists the producer in needs reads it from the needs context.

Consuming it
  deploy:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - run: echo "Deploying ${{ needs.build.outputs.version }}"

When to use them

  • Pass a computed version or tag from build to deploy.
  • Share a boolean flag that gates a downstream job.
  • Hand off a short identifier instead of a full artifact.

Why it matters

Job outputs are the canonical way to pass small values between jobs, version numbers, tags, computed flags, keeping pipelines DRY without artifacts for tiny strings.

Related concepts

Job outputs build on step outputs and the needs keyword and are read via the needs context.

Key takeaways

  • A job output exposes a value to dependent jobs.
  • It is sourced from a step output.
  • Read it via needs.<job>.outputs.<name>.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →