Skip to content

Commit

Permalink
Testing capturing step output
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Jun 4, 2024
1 parent d30a7ac commit d468dce
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

---
name: Capture Step Output
on:
- push
env:
FORCE_COLOR: 1

jobs:
capture_output:
runs-on: "ubuntu-24.04"

steps:
- name: Generate output
id: generate_output
run: |
echo "Generating a random number"
RANDOM_NUMBER=$RANDOM
echo "random_number=$RANDOM_NUMBER" >> $GITHUB_OUTPUT
- name: Use output from previous step
run: echo "Random number is: ${{ steps.generate_output.outputs.random_number }}"

0 comments on commit d468dce

Please sign in to comment.