Skip to content

Commit

Permalink
Configure additional launch options at create (#69)
Browse files Browse the repository at this point in the history
* optionally attach additional options to the initial fly launch command
* add readme
  • Loading branch information
jphenow authored Oct 16, 2024
1 parent 6f79ec3 commit f7152c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ If you have an existing `fly.toml` in your repo, this action will copy it with a
| `cpukind` | Set app VM CPU kind - shared or performance. Default shared. |
| `memory` | Set app VM memory in megabytes. Default 256. |
| `ha` | Create spare machines that increases app availability. Default `false`. |
| `launch_options` | Attaches additional options to fly at app creation if specified |

## Required Secrets

Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ inputs:
ha:
description: Create spare machines that increases app availability (default false)
default: false
launch_options:
description: Additional options to pass to the Fly launch command at creation
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fi
if ! flyctl status --app "$app"; then
# Backup the original config file since 'flyctl launch' messes up the [build.args] section
cp "$config" "$config.bak"
flyctl launch --no-deploy --copy-config --name "$app" --image "$image" --region "$region" --org "$org"
flyctl launch --no-deploy --copy-config --name "$app" --image "$image" --region "$region" --org "$org" $INPUT_LAUNCH_OPTIONS
# Restore the original config file
cp "$config.bak" "$config"
fi
Expand Down

0 comments on commit f7152c1

Please sign in to comment.