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 d0d2e92 commit 000c7d7
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ jobs:
- name: Set color
id: color-selector
run: echo "SELECTED_COLOR=green" >> "$GITHUB_OUTPUT"
"action_state=yellow" >> "$GITHUB_ENV"
- name: Get color
env:
SELECTED_COLOR: ${{ steps.color-selector.outputs.SELECTED_COLOR }}
run: echo "The selected color is $SELECTED_COLOR"
printf '%s\n' "$action_state" # This will output 'yellow'

build2:
needs: build
Expand All @@ -27,9 +25,9 @@ jobs:
- name: survived first job
id: second_job
env:
SELECTED_COLOR: ${{ steps.color-selector.outputs.SELECTED_COLOR }}
run: echo "The selected color is $SELECTED_COLOR" \
echo "$GITHUB_OUTPUT survived first job!"
printf '%s\n' "$action_state (should be yellow) did not survive first job!"
echo "$GITHUB_ENV did not survive first job"
SELECTED_COLOR: ${{ jobs.build.steps.color-selector.outputs.SELECTED_COLOR }}
run: echo "The selected color from previous job is $SELECTED_COLOR"
echo "$SELECTED_COLOR survived first job!"



0 comments on commit 000c7d7

Please sign in to comment.