maybe just use secrets again

This commit is contained in:
Kristian Freeman 2019-10-11 14:41:24 -05:00
parent 16beb42605
commit cc94965ee9

View file

@ -10,7 +10,7 @@ export WRANGLER_HOME="/github/workspace"
sanitize() { sanitize() {
if [ -z "${1}" ] if [ -z "${1}" ]
then then
>&2 echo "Unable to find the ${2}. Did you set with.${2}?" >&2 echo "Unable to find ${2}. Did you set secrets.${2}?"
exit 1 exit 1
fi fi
} }
@ -22,10 +22,8 @@ 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 "${CLOUDFLARE_EMAIL}" "CLOUDFLARE_EMAIL"
export CLOUDFLARE_EMAIL="$INPUT_EMAIL" sanitize "${CLOUDFLARE_API_KEY}" "CLOUDFLARE_API_KEY"
sanitize "${INPUT_APIKEY}" "apiKey"
export CLOUDFLARE_API_KEY="$INPUT_APIKEY"
npm i @cloudflare/wrangler -g npm i @cloudflare/wrangler -g
npm i npm i