-
-
Save KyMidd/00c2c728a73a5219e35e43141b73cb5d to your computer and use it in GitHub Desktop.
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: Passing variable Jobs Broken | |
| on: workflow_dispatch | |
| jobs: | |
| pass-var: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set deploy location | |
| id: set-var | |
| run: | | |
| ENVIRONMENT=dev | |
| echo "The ENVIRONMENT var is: $ENVIRONMENT" | |
| echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_ENV | |
| job2-read-var: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Print the deploy location | |
| run: | | |
| if [ -z "$ENVIRONMENT" ]; then | |
| echo "No ENVIRONMENT var set, exiting" | |
| exit 1 | |
| else | |
| echo "The ENVIRONMENT var is set to: $ENVIRONMENT" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment