Skip to content

Commit

Permalink
Update tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabor12321 authored Nov 10, 2023
1 parent d8123fd commit ac056fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
jobs:
build:
runs-on: ubuntu-latest
outputs:
SELECTED_COLOR: ${{ steps.color-selector.outputs.SELECTED_COLOR }}

steps:
- name: Set color
id: color-selector
run: echo "SELECTED_COLOR=green" >> "$GITHUB_OUTPUT"
- name: Get color
env:
SELECTED_COLOR: ${{ steps.color-selector.outputs.SELECTED_COLOR }}
run: echo "The selected color is $SELECTED_COLOR"

build2:
Expand All @@ -24,8 +24,10 @@ jobs:
steps:
- name: survived first job
id: second_job
run: echo "The selected color from previous job is $SELECTED_COLOR"
echo "$SELECTED_COLOR survived first job!"
env:
lastjob_output: ${{ needs.color-selector.outputs.SELECTED_COLOR }}
run: echo "The selected color from previous job is $lastjob_output"
echo "$lastjob_output survived first job!"



0 comments on commit ac056fc

Please sign in to comment.