Skip to content

Commit

Permalink
Create Prev-Step-Ref-Demo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rindeal authored Sep 2, 2024
1 parent c616efc commit d61e2fd
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/Prev-Step-Ref-Demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Previous Step Referencing Demo"

on:
workflow_dispatch:

jobs:
'demo':
runs-on: 'ubuntu-latest'

steps:
- name: "Step #0"
id: step0
run: echo "value=STEP_0" >> $GITHUB_OUTPUT

- name: "Step #1"
id: step1
run: echo "value=STEP_1" >> $GITHUB_OUTPUT

- name: "Step #2"
id: step2
run: echo "value=STEP_2" >> $GITHUB_OUTPUT

- name: Use the output from the previous step
# run: echo "The output from the previous step is: "
run: |
echo "${STEPS}" | jq -C .
env:
STEPS: ${{ toJSON(steps) }}

0 comments on commit d61e2fd

Please sign in to comment.