bitwalker / distillery-aws-example

An example application to go with the AWS guide in the Distillery documentation
Apache License 2.0
52 stars 73 forks source link

Use env var instead of file for GITHUB_TOKEN #9

Closed brucepom closed 5 years ago

brucepom commented 5 years ago

The docs suggest setting GITHUB_TOKEN as an environment variable. But this script expects to find the token in a file called GITHUB_TOKEN instead. This led to some confusion when people followed the docs and created the GITHUB_TOKEN env var but then got an error message like GITHUB_TOKEN: No such file or directory.

With the change above we now expect an env var and print You must set GITHUB_TOKEN! if it's not set. This is consistent with the docs and I think env var is a more secure and flexible approach than putting the token in a file.

If you prefer I can update the guide instead to use the file approach.

I realize the line GITHUB_TOKEN="$GITHUB_TOKEN" is redundant but perhaps it's worth leaving it in for documentations sake.

This partially resolves https://github.com/bitwalker/distillery-aws-example/issues/5