Skip to content

Commit c82f4e4

Browse files
committed
hellojob2
1 parent 9b7ecfe commit c82f4e4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/1.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
name: First Workflow
22

33
on:
4-
workflow_dispatch:
4+
workflow_dispatch:
5+
56
env:
67
MY_VARIABLE: "Hello from workflow"
8+
79
jobs:
810
job1:
911
runs-on: ubuntu-latest
1012
steps:
1113
- name: Set environment variable
12-
run: echo "MY_VARIABLE=Hello from job1" >> $GITHUB_ENV
14+
run: echo "HelloJob2=Hello from job1" >> $GITHUB_ENV
1315

1416
- name: Echo phrase for job1
1517
run: echo "This is job1"
@@ -19,11 +21,11 @@ jobs:
1921
needs: job1
2022
steps:
2123
- name: Echo phrase for job2
22-
run: echo "This is job2 and MY_VARIABLE is ${{ env.MY_VARIABLE }}"
24+
run: echo "This is job2 and MY_VARIABLE is ${{ env.MY_VARIABLE }} and HelloJob2 is ${{ env.HelloJob2 }}"
2325
env:
24-
MY_VARIABLE: ${{ env.MY_VARIABLE }}
26+
JOB2_VARIABLE: ${{ env.MY_VARIABLE }}
2527
- name: Cowsays
2628
uses: mscoutermarsh/cowsays-action@master
2729
with:
28-
text: 'Ready for prod--hsip it! and MY_VARIABLE is ${{ env.MY_VARIABLE }}'
29-
color: 'magenta'
30+
text: 'Ready for prod--ship it! and MY_VARIABLE is ${{ env.MY_VARIABLE }} and HelloJob2 is ${{ env.HelloJob2 }}'
31+
color: 'magenta'

0 commit comments

Comments
 (0)