Check for env vars, correct workspace dir

This commit is contained in:
Kristian Freeman 2019-10-11 12:32:05 -05:00
parent d788022550
commit 4f3696e978
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,4 @@
FROM node:10.14.1-alpine
COPY entrypoint.sh /entrypoint.sh
ENV WRANGLER_HOME /github/workspace
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -2,6 +2,16 @@
set -e
if [ -n "$CLOUDFLARE_API_KEY" ]; then
echo "CLOUDFLARE_API_KEY env var needs to be set. Add this field in the 'Secrets' section of your repo's settings."
exit 1
fi
if [ -n "$CLOUDFLARE_EMAIL" ]; then
echo "CLOUDFLARE_EMAIL env var needs to be set. Add this field in the 'Secrets' section of your repo's settings."
exit 1
fi
npm i
npm i @cloudflare/wrangler -g
wrangler whoami