Skip to content

Commit 14d2721

Browse files
committed
feat: test
1 parent 7a8c27d commit 14d2721

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/build-test-deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ jobs:
1111
- uses: actions/checkout@v3
1212

1313
- name: Set Environment Variable
14+
id: set-env
1415
run: |
1516
echo "MY_ENV_VAR=HelloWorld" >> $GITHUB_ENV
17+
outputs:
18+
my_env_var: ${{ steps.set-env.outputs.MY_ENV_VAR }}
1619

1720
example_job:
1821
runs-on: ubuntu-latest
@@ -25,11 +28,11 @@ jobs:
2528
uses: actions/checkout@v3
2629

2730
- name: Get Environment Variable
28-
run: echo "The value of MY_ENV_VAR is ${{ env.MY_ENV_VAR }}"
31+
run: echo "The value of MY_ENV_VAR is ${{ needs.set_env_var.output.my_env_var }}"
2932

3033
- name: Use Environment Variable in Another Step
3134
run: |
32-
if [[ "${{ env.MY_ENV_VAR }}" == "HelloWorld" ]]; then
35+
if [[ "${{ needs.set_env_var.output.my_env_var }}" == "HelloWorld" ]]; then
3336
echo "The environment variable is correctly set!"
3437
else
3538
echo "The environment variable is not set correctly."

0 commit comments

Comments
 (0)