# Pass Output Between Jobs (https://www.shipfox.io/docs/how-to/author-workflows/pass-outputs)

Description: Pass output from one job to another job in the same workflow.

Use a job output to pass output between jobs. The first job publishes a step
output. A dependent job reads it.

## Pass output between jobs [#pass-output-between-jobs]

```yaml
# yaml-language-server: $schema=https://www.shipfox.io/docs/workflow.schema.json
name: Pass output between jobs
runner: shipfox

triggers:
  manual:
    source: manual

jobs:
  prepare:
    outputs:
      message: ${{ steps.create_message.outputs.message }}
    steps:
      - key: create_message
        run: echo "message=Hello from the prepare job" >> "$SHIPFOX_OUTPUT"
        outputs:
          message: string

  consume:
    needs: prepare
    steps:
      - env:
          MESSAGE: ${{ jobs.prepare.outputs.message }}
        run: echo "$MESSAGE"
```

The `prepare` job publishes the `message` step output. The `consume` job
depends on `prepare` and reads the job output.

## Verify the output [#verify-the-output]

### Start the workflow

Select **Run**, then open the new run.

### Compare the output

Open `prepare` and confirm that its outputs include `message`. Open
`consume` and confirm that its log contains `Hello from the prepare job`.

See [Step outputs](https://www.shipfox.io/docs/reference/workflow-schema#step-outputs) for declaration
types and encoding. See [Job outputs](https://www.shipfox.io/docs/reference/limits#job-outputs) for size
limits.