Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy options #70

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to comment on it, maybe we should use the latest version as an example.

      - name: Deploy
        id: deploy
        uses: superfly/[email protected]

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ 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 |
| `launch_options` | Attaches additional options to the fly launch command if specified |
| `deploy_options` | Attaches additional options to the fly deploy command 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 @@ -40,3 +40,5 @@ inputs:
default: false
launch_options:
description: Additional options to pass to the Fly launch command at creation
deploy_option:
description: Additional options to pass to the Fly deploy command
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ fi
# Trigger the deploy of the new version.
echo "Contents of config $config file: " && cat "$config"
if [ -n "$INPUT_VM" ]; then
flyctl deploy --config "$config" --app "$app" --regions "$region" --image "$image" --strategy immediate --ha=$INPUT_HA --vm-size "$INPUT_VMSIZE"
flyctl deploy --config "$config" --app "$app" --regions "$region" --image "$image" --strategy immediate --ha=$INPUT_HA --vm-size "$INPUT_VMSIZE" $INPUT_DEPLOY_OPTIONS
else
flyctl deploy --config "$config" --app "$app" --regions "$region" --image "$image" --strategy immediate --ha=$INPUT_HA --vm-cpu-kind "$INPUT_CPUKIND" --vm-cpus $INPUT_CPU --vm-memory "$INPUT_MEMORY"
flyctl deploy --config "$config" --app "$app" --regions "$region" --image "$image" --strategy immediate --ha=$INPUT_HA --vm-cpu-kind "$INPUT_CPUKIND" --vm-cpus $INPUT_CPU --vm-memory "$INPUT_MEMORY" $INPUT_DEPLOY_OPTIONS
fi

# Make some info available to the GitHub workflow.
Expand Down