First Workflow #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: First Workflow | |
on: | |
workflow_dispatch: | |
env: | |
MY_VARIABLE: "Hello from workflow" | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set environment variable | |
run: echo "HelloJob2=Hello from job1" >> $GITHUB_ENV | |
- name: Echo phrase for job1 | |
run: echo "This is job1" | |
job2: | |
runs-on: ubuntu-latest | |
needs: job1 | |
steps: | |
- name: Echo phrase for job2 | |
run: echo "This is job2 and MY_VARIABLE is ${{ env.MY_VARIABLE }} and HelloJob2 is ${{ env.HelloJob2 }}" | |
env: | |
JOB2_VARIABLE: ${{ env.MY_VARIABLE }} | |
- name: Cowsays | |
uses: mscoutermarsh/cowsays-action@master | |
with: | |
text: 'Ready for prod--ship it! and MY_VARIABLE is ${{ env.MY_VARIABLE }} and HelloJob2 is ${{ env.HelloJob2 }}' | |
color: 'magenta' |