Update workflows *.yaml

This commit is contained in:
Hang Cui
2025-10-17 13:09:18 -07:00
parent 9c40e143b0
commit 04de1f4a23

View File

@@ -0,0 +1,25 @@
name: Passing Data Between Jobs
on:
workflow_dispatch:
jobs:
data-sender:
runs-on: ubuntu-22.04
steps:
- name: Create data
id: sender # Set the output name for this step to Apple
run: |
echo "name=Apple" >> $GITHUB_OUTPUT
outputs:
name: ${{ steps.sender.outputs.name }}
data-receiver:
runs-on: ubuntu-22.04
needs: ["data-sender"]
    # In order to have data for receiver sender needs to first produce some data.
steps:
- name: Receive data
# Notice how we use needs object to access the sender job's outputs
run: |
echo ${{ needs.data-sender.outputs.name }}