flyctl deploy --build-secret with multiple variables not working

Hello, am trying to deploy an app with --build-secrets.

flyctl deploy \
    --build-secret="FUSION_AUTH_URL=$FUSION_AUTH_URL" \
    --build-secret="FUSION_AUTH_PUBLIC_KEY=$FUSION_AUTH_PUBLIC_KEY"

But am getting an error but when i tried setting just one variable it work fine.

Error message

Run flyctl deploy \ --build-secret="FUSION_AUTH_URL=$FUSION_AUTH_URL" \ --build-secret="FUSION_AUTH_PUBLIC_KEY=$FUSION_AUTH_PUBLIC_KEY"_PORT

[32](https://github.com/name/actions/runs/3218809617/jobs/5263419557#step:4:33)Error: accepts at most 1 arg(s), received 2

[33](https://github.com/name/actions/runs/3218809617/jobs/5263419557#step:4:34)Error accepts at most 1 arg(s), received 2

I haven’t used any build secrets, but based on the error I guess you have got the format wrong. Try this,

flyctl deploy --build-secret FUSION_AUTH_URL=$FUSION_AUTH_URL --build-secret FUSION_AUTH_PUBLIC_KEY=$FUSION_AUTH_PUBLIC_KEY

1 Like

If i run that way then i have a different error

Error: bad flag syntax: -----END

[33]Error bad flag syntax: -----END

any chance the github actions yaml strips new lines, making the backslashes unnecessary?

(random guess on my part)

1 Like

I was almost sure i have run with this syntax.
This work way works
flyctl deploy --build-secret="FUSION_AUTH_URL=$FUSION_AUTH_URL" --build-secret="FUSION_AUTH_PUBLIC_KEY=$FUSION_AUTH_PUBLIC_KEY"

Haha well as long as it works! :joy::sweat_smile: