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 e507906
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/env_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
- run: |
echo "Environment: $ENVIRONMENT"
echo "Secret: ${{ secrets.MY_SECRET }}"
- run: env
- name: "Testing variables in ${{ env.ENVIRONMENT }}"
run: |
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

---
name: Capture Step Output
on:
- push

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

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

0 comments on commit e507906

Please sign in to comment.