Skip to content

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

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]

@sjdonado sjdonado mentioned this pull request Mar 5, 2025
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.

2 participants