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

Conversation

jhuizy
Copy link

@jhuizy jhuizy commented Dec 5, 2024

What does this PR do?

Adds a deploy_options input to the github action which is appended to the fly deploy ... command allowing the user of the action to configure anything the fly deploy command supports.

Example Usage

name: Staging App
on:
  pull_request:
    types: [opened, reopened, synchronize, closed]

env:
  FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
  FLY_REGION: iad
  FLY_ORG: personal

jobs:
  staging_app:
    runs-on: ubuntu-latest

    # Only run one deployment at a time per PR.
    concurrency:
      group: pr-${{ github.event.number }}

    # Create a GitHub deployment environment per staging app so it shows up
    # in the pull request UI.
    environment:
      name: pr-${{ github.event.number }}
      url: ${{ steps.deploy.outputs.url }}

    steps:
      - uses: actions/checkout@v4

      - name: Deploy
        id: deploy
        uses: superfly/[email protected]
        with:
          deploy_options: "--build-arg RELEASE_VERSION=beta-${{ github.even.number }}"

Why?

The main use case I had for this was specifying thebuild-arg option. If preferred, we could add that in? Although I think this will solve more use cases and can help if/when fly adds more options to the deploy command.

More Info

I updated the doc on launch_options to be more specific as well.

Open for any feedback/adjustments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant