Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check for env vars, correct workspace dir
  • Loading branch information
Kristian Freeman committed Oct 11, 2019
1 parent d788022 commit 4f3696e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
@@ -1,3 +1,4 @@
FROM node:10.14.1-alpine
COPY entrypoint.sh /entrypoint.sh
ENV WRANGLER_HOME /github/workspace
ENTRYPOINT ["/entrypoint.sh"]
10 changes: 10 additions & 0 deletions entrypoint.sh
Expand Up @@ -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
Expand Down

0 comments on commit 4f3696e

Please sign in to comment.