Skip to content

Testing capturing step output #1

Testing capturing step output

Testing capturing step output #1

Workflow file for this run

---
name: Capture Step Output
on:
- push
env:
FORCE_COLOR: 1
jobs:
capture_output:
runs-on: "ubuntu-24.04"
steps:
- name: Step 1 - Generate output
id: generate_output
run: |
echo "Generating a random number"
RANDOM_NUMBER=$RANDOM
echo "random_number=$RANDOM_NUMBER" >> $GITHUB_OUTPUT
- name: Step 2 - Use output from previous step
run: echo "The random number generated in Step 1 is: ${{ steps.generate_output.outputs.random_number }}"

Check failure on line 22 in .github/workflows/steps.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/steps.yml

Invalid workflow file

You have an error in your yaml syntax on line 22