Skip to content

Instantly share code, notes, and snippets.

@nashmaniac
Last active June 1, 2020 13:45
Show Gist options
  • Save nashmaniac/38e5026294074ca69f536bd168c4f959 to your computer and use it in GitHub Desktop.
Save nashmaniac/38e5026294074ca69f536bd168c4f959 to your computer and use it in GitHub Desktop.
environement variables
# You can have environment variables in the workflow
# this will be available in each job and steps inside it.
env:
PROJECT_ID: sample-project-id
USERNAME: sample-username
# So now in each steps you can access them by $PROJECT_ID or $USERNAME
# Normally the environment variables will show their value when printed in logs
# You might want to hide sensitive information in logs like password
# For this use, secrets.
# You can set secrets under Variables in each repository settings
# Repo --> Settings --> Variables
env:
PROJECT_ID: sample-project-id
USERNAME: sample-username
PASSWORD: ${{secrets.PASSWORD}} # you have to set PASSWORD in variables under repo settings
# You can have env variables in jobs and steps too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment