First Workflow #1
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: | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set environment variable | |
run: echo "MY_VARIABLE=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 ${{ needs.job1.outputs.MY_VARIABLE }}" | |
env: | |
MY_VARIABLE: ${{ needs.job1.outputs.MY_VARIABLE }} | |
- name: Cowsays | |
uses: mscoutermarsh/cowsays-action@master | |
with: | |
text: 'Ready for prod--hsip it! and MY_VARIABLE is ${{ needs.job1.outputs.MY_VARIABLE }}' | |
color: 'magenta' |