superfly / fly-pr-review-apps

Github Action for PR Review Apps on Fly.io
Apache License 2.0
186 stars 116 forks source link

Ability to set --build-arg #4

Open callumlocke opened 2 years ago

callumlocke commented 2 years ago

When I deploy, I have to use --build-arg to set an environment variable that needs to be present on the builder during build, like this:

fly deploy --remote-only --build-arg DATABASE_URL="postgres://..."

Is there any way to set this when using this GitHub Action?

jsierles commented 2 years ago

We'd have to add this behavior. PRs are welcome! Maybe it would be useful to allow specifying arbitrary arguments to fly deploy. Also I thought it might be useful to clone secrets from the source app.

I'm curious - why do you need access to the database at build time? One downside with this approach - credentials are stored in the image permanently, posing a security risk. We're working on adding support for build-time secrets to flyctl.

jsierles commented 2 years ago

Related - flyctl release v0.0.333 supports passing build secrets on the command line.

kishanhitk commented 7 months ago

Any updates on this?

I want to set --build-secret.

I tried the secrets option, but it sets the runtime secret, and not --build-secret.