Last active
May 7, 2023 18:36
-
-
Save KyMidd/89902adff63d273065de25c1a4dd87c0 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 Fail | |
| 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" | |
| - name: Read deploy location | |
| id: read-var | |
| 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