GitHub Actions 1 · Jobs, matrices and conditions

Pass data between jobs

Expose a step's output as a job output that later jobs can read.

jobs:
  build:
    runs-on: ubuntu-latest
    outputs:
      version: ${{ steps.ver.outputs.version }}
    steps:
      - id: ver
        run: echo "version=1.2.3" >> "$GITHUB_OUTPUT"
  deploy:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - run: echo "Deploying ${{ needs.build.outputs.version }}"

Official GitHub Actions 1 documentation

More jobs, matrices and conditions commands

All jobs, matrices and conditions commands · GitHub Actions 1 cheatsheet

Was this page helpful?