fly-pr-review-apps: Not able to deploy Phoenix App
I’m trying to use this GithubAction in my Phoenix app.
The problem is in this line https://github.com/superfly/fly-pr-review-apps/blob/5d5f1c2465bf8197d2e64d3266412c380ebf1917/entrypoint.sh#L40
flyctl attempts to execute mix but since mix is not installed in the docker container, it fails.
In addition there are multiple problems with the current main which makes this GithubAction unusable at least for my use case .
I forked the repo and move the main code to index.js, you can find it at https://github.com/slashmili/fly-pr-review-apps/blob/nodejs-action/index.js
I’m using it in my project like:
- name: Set up Elixir
uses: erlef/setup-beam@e3f6ffe2878180f57318bf13febd3933ee81f664
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.ERLANG_VERSION }}
- name: Deploy
id: deploy
uses: slashmili/fly-pr-review-apps@nodejs-action
with:
org: myorg
region: arn
postgres: my-staging-db
This way by the time that Deploy step is getting executed, already Elixir and mix is installed can flyctl commands can use the mix command.
If you are interested in maintaining the upstream, I’d purpose that take the same approach. I’m not familiar with node so take my changes with grain of salt.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 2
- Comments: 28
Commits related to this issue
- fix: changed flyctl command to work with phoenix app fixes https://github.com/superfly/fly-pr-review-apps/issues/22 as suggested by @amos-kibet — committed to Complear/fly-pr-review-apps by brecke 3 years ago
- Revert "Add preview deployments for pull requests" This reverts commit 11c60864ce2b88681b13e516135830db5b492e2c. For context: https://github.com/superfly/fly-pr-review-apps/issues/22 Signed-off-by:... — committed to jehrhardt/cozyauth by jehrhardt 2 years ago
- testing https://github.com/superfly/fly-pr-review-apps/issues/22#issuecomment-1989618079 — committed to kgittens89/fly_finds by kgittens89 2 years ago
Thanks for this @type1fool. The problem with not authorized was actually my fly token not having permission, I already solved that. But I really don’t understand how yours - and anyone using
1.2.0are making this work as I’m always gettingexec: "mix": executable file not found in $PATHand if I use1.0.0I’m not able to set up secrets. Is there a way to change the arguments of the fly launch command?