Last active
May 7, 2023 18:32
This file contains 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 Fixed | |
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 | |
- 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