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
- Test across versions
- Run jobs in order
- Run a step conditionally
- Run a step after a failure
- Cancel outdated runs
- Start a database for tests
All jobs, matrices and conditions commands · GitHub Actions 1 cheatsheet