mirror of
https://github.com/FlipsideCrypto/fly-pr-review-apps.git
synced 2026-02-06 11:17:49 +00:00
WIP
This commit is contained in:
parent
06ea104bec
commit
39bec53c3c
20
action.yml
20
action.yml
@ -1,5 +1,5 @@
|
||||
name: "GitHub Action for flyctl"
|
||||
description: "Wraps the flyctl CLI tool to enable deploying and managing Fly apps"
|
||||
name: "GitHub Action for deplying staging apps on fly.io"
|
||||
description: "Wraps the flyctl CLI tool to enable managing temporary staging apps on Fly"
|
||||
author: Fly
|
||||
branding:
|
||||
icon: "upload-cloud"
|
||||
@ -7,3 +7,19 @@ branding:
|
||||
runs:
|
||||
using: "docker"
|
||||
image: "Dockerfile"
|
||||
inputs:
|
||||
action:
|
||||
description: create, deploy, or destroy
|
||||
app-prefix:
|
||||
description: App name that will be suffixed with e.g. *-pr123 based on the PR
|
||||
required: true
|
||||
image:
|
||||
description: Optional pre-existing Docker image to use
|
||||
region:
|
||||
description: Region to launch the app in (alternatively, set the env FLY_REGION)
|
||||
org:
|
||||
description: Organization to launch the app in (alternatively, set the env FLY_ORG)
|
||||
path:
|
||||
description: path to a directory with a pre-existing fly.toml which will be copied
|
||||
postgres:
|
||||
description: Optionally attach the app to a pre-existing postgres cluster on Fly
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
if [ -n "$FLY_PROJECT_PATH" ]; then
|
||||
if [ -n "$INPUT_PATH" ]; then
|
||||
PREV_PATH=$(pwd)
|
||||
# Allow user to change directories in which to run Fly commands
|
||||
cd "$FLY_PROJECT_PATH" || exit
|
||||
cd "$INPUT_PATH" || exit
|
||||
fi
|
||||
sh -c "flyctl $*"
|
||||
|
||||
PR_NUMBER=$(echo "$GITHUB_REF" | awk 'BEGIN { FS = "/" } ; { print $3 }')
|
||||
|
||||
echo "PR_NUMBER: $PR_NUMBER"
|
||||
echo "app: $INPUT_APP_PREFIX-pr$PR_NUMBER"
|
||||
|
||||
env
|
||||
|
||||
echo "workflow/event.json:"
|
||||
cat workflow/event.json
|
||||
|
||||
ACTUAL_EXIT="$?"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user