mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-24 19:04:46 +01:00
Check for env vars, correct workspace dir
This commit is contained in:
parent
d788022550
commit
4f3696e978
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
FROM node:10.14.1-alpine
|
FROM node:10.14.1-alpine
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
ENV WRANGLER_HOME /github/workspace
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
|
@ -2,6 +2,16 @@
|
||||||
|
|
||||||
set -e
|
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
|
||||||
npm i @cloudflare/wrangler -g
|
npm i @cloudflare/wrangler -g
|
||||||
wrangler whoami
|
wrangler whoami
|
||||||
|
|
Loading…
Reference in a new issue