diff --git a/packages/action/entrypoint.sh b/packages/action/entrypoint.sh index 8a5d3e7..a21c1f9 100644 --- a/packages/action/entrypoint.sh +++ b/packages/action/entrypoint.sh @@ -1,25 +1,25 @@ -#!/bin/bash +#!/bin/sh set -e # Set environment variables by stripping "key=" and keeping only the value -export STORAGE_BUCKET=${1#*=} -export WEBSITE_ID=${2#*=} -export WEBSITE_EXPIRES=${3#*=} -export KEEP_HISTORY=${4#*=} -export KEEP_RESULTS=${5#*=} -export SLACK_CHANNEL_ID=${6#*=} -export ALLURE_RESULTS_PATH=${7#*=} -export SHOW_RETRIES=${8#*=} -export SHOW_HISTORY=${9#*=} - - -if [[ -z "$WEBSITE_ID" ]] && [[ -z "$STORAGE_BUCKET" ]]; then +export STORAGE_BUCKET="${1#*=}" +export WEBSITE_ID="${2#*=}" +export WEBSITE_EXPIRES="${3#*=}" +export KEEP_HISTORY="${4#*=}" +export KEEP_RESULTS="${5#*=}" +export SLACK_CHANNEL_ID="${6#*=}" +export ALLURE_RESULTS_PATH="${7#*=}" +export SHOW_RETRIES="${8#*=}" +export SHOW_HISTORY="${9#*=}" + + +if [ -z "$WEBSITE_ID" ] && [ -z "$STORAGE_BUCKET" ]; then echo "Error: Either website_id or storage_bucket must be set" >&2 exit 1 fi -if [[ -z "$GOOGLE_CREDENTIALS_JSON" ]]; then +if [ -z "$GOOGLE_CREDENTIALS_JSON" ]; then echo "Provide a valid Firebase GCP JSON " exit 1 else