This commit is contained in:
Kristian Freeman 2019-10-11 14:34:18 -05:00
parent aab7849afe
commit 698bc9db77

View file

@ -7,7 +7,7 @@ export NVM_DIR="/github/workspace/nvm"
export WRANGLER_HOME="/github/workspace" export WRANGLER_HOME="/github/workspace"
# h/t https://github.com/elgohr/Publish-Docker-Github-Action # h/t https://github.com/elgohr/Publish-Docker-Github-Action
function sanitize() { function sanitize () {
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
>&2 echo "Unable to find the ${2}. Did you set with.${2}?" >&2 echo "Unable to find the ${2}. Did you set with.${2}?"
exit 1 exit 1
@ -21,9 +21,9 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
mkdir -p "$HOME/.wrangler" mkdir -p "$HOME/.wrangler"
chmod -R 777 "$HOME/.wrangler" chmod -R 777 "$HOME/.wrangler"
_sanitize "${INPUT_EMAIL}" "email" sanitize "${INPUT_EMAIL}" "email"
export CLOUDFLARE_EMAIL="$INPUT_EMAIL" export CLOUDFLARE_EMAIL="$INPUT_EMAIL"
_sanitize "${INPUT_APIKEY}" "apiKey" sanitize "${INPUT_APIKEY}" "apiKey"
export CLOUDFLARE_API_KEY="$INPUT_APIKEY" export CLOUDFLARE_API_KEY="$INPUT_APIKEY"
npm i @cloudflare/wrangler -g npm i @cloudflare/wrangler -g