Skip to content

Instantly share code, notes, and snippets.

@GuillaumeFalourd
Created September 15, 2021 13:56
Show Gist options
  • Save GuillaumeFalourd/d48e86a7a94b5750329c3afdcef3624d to your computer and use it in GitHub Desktop.
Save GuillaumeFalourd/d48e86a7a94b5750329c3afdcef3624d to your computer and use it in GitHub Desktop.
name: Workflow Outputs
on:
workflow_dispatch:
jobs:
job1:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
output1: ${{ steps.step1.outputs.test }}
output2: ${{ steps.step2.outputs.test }}
steps:
- id: step1
run: echo "::set-output name=test::hello"
- id: step2
run: echo "::set-output name=test::world"
job2:
runs-on: ubuntu-latest
# Wait from the job1 to be completed before starting job2
needs: job1
steps:
- run: echo ${{needs.job1.outputs.output1}} ${{needs.job1.outputs.output2}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment