Skip to content

Commit dfbbb72

Browse files
author
Raffaele Marcello
committed
Update first workflow to include secret variable and environment variable
1 parent 0d9517f commit dfbbb72

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/first-workflow.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ jobs:
1010
steps:
1111
- name: Echo Job 1
1212
env:
13-
MY_SECRET_VAR: ${{ secrets.MY_SECRET_VAR }}
14-
run: echo $MY_SECRET_VAR
13+
SECRET: ${{ secrets.MY_SECRET_VAR }}
14+
run: echo $SECRET
1515

1616
job2:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Ship it
2020
uses: mscoutermarsh/cowsays-action@master
21+
env:
22+
MY_VAR: ${{ secrets.SECRET }}
2123
with:
22-
text: 'Ready for prod–ship it! ${{ env.MY_VAR }}'
24+
text: 'Ready for prod–ship it! myvar=$MY_VAR'
2325
color: 'magenta'

0 commit comments

Comments
 (0)