Compare commits

...

2 Commits
1.0.26 ... main

Author SHA1 Message Date
Don Cote
1e439ccbf9 fix lowercasing app name 2022-09-12 14:41:53 -04:00
Don Cote
14a293ef07 lowercase app names 2022-09-12 14:29:47 -04:00

View File

@ -15,6 +15,7 @@ EVENT_TYPE=$(jq -r .action /github/workflow/event.json)
# Default the Fly app name to pr-{repo}-{title}-{number}-{user}
app="${INPUT_NAME:-pr-$REPO_NAME-$PR_TITLE-$PR_NUMBER-$USER}"
app=$(echo $app | tr '[:upper:]' '[:lower:]')
region="${INPUT_REGION:-${FLY_REGION:-iad}}"
org="${INPUT_ORG:-${FLY_ORG:-personal}}"
image="$INPUT_IMAGE"
@ -44,11 +45,13 @@ if [ -n "$INPUT_POSTGRES" ]; then
flyctl postgres attach "$INPUT_POSTGRES" --app "$app" --database-name "$app"-db || true
fi
# Set up secrets
if [ -n "$INPUT_SECRETS" ]; then
echo "Setting secrets."
echo $INPUT_SECRETS | tr " " "\n" | flyctl secrets import --app "$app"
fi
# Deploy the app
if [ "$INPUT_UPDATE" != "false" ]; then
echo "Deploying the app."
flyctl deploy --config "$INPUT_CONFIG" --app "$app" --region "$region" --strategy immediate --image "$image" --remote-only