From e4957e60c0ce04f1ea12ef347ae702062c3b1245 Mon Sep 17 00:00:00 2001 From: Kristian Freeman Date: Mon, 14 Oct 2019 15:04:41 -0500 Subject: [PATCH] Correct usage of inputs in action/entrypoint --- action.yml | 4 ++-- entrypoint.sh | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 4b7cb0d..410900b 100644 --- a/action.yml +++ b/action.yml @@ -4,9 +4,9 @@ runs: using: 'docker' image: 'Dockerfile' inputs: - apiKey: + CLOUDFLARE_API_KEY: description: "Your Cloudflare API Key" required: true - email: + CLOUDFLARE_EMAIL: description: "Your Cloudflare Email" required: true diff --git a/entrypoint.sh b/entrypoint.sh index 3be95d4..b81d773 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -22,8 +22,11 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash mkdir -p "$HOME/.wrangler" chmod -R 777 "$HOME/.wrangler" -sanitize "${CLOUDFLARE_EMAIL}" "CLOUDFLARE_EMAIL" -sanitize "${CLOUDFLARE_API_KEY}" "CLOUDFLARE_API_KEY" +sanitize "${INPUT_CLOUDFLARE_EMAIL}" "CLOUDFLARE_EMAIL" +sanitize "${INPUT_CLOUDFLARE_API_KEY}" "CLOUDFLARE_API_KEY" + +export CLOUDFLARE_EMAIL="$INPUT_CLOUDFLARE_EMAIL" +export CLOUDFLARE_API_KEY="$INPUT_CLOUDFLARE_API_KEY" npm i @cloudflare/wrangler -g npm i