Skip to content

Commit

Permalink
fix: bash not available in alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersokari committed Dec 16, 2024
1 parent 8be9068 commit 7c6b9ab
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packages/action/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 7c6b9ab

Please sign in to comment.