ubient / laravel-vapor-action

Run Laravel Vapor commands directly from Github Actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibility to specify php version

gpasini opened this issue · comments

Hi,

Thanks for this github action.

Is it possible to specify the php version for the dockerfile ?

Hello,

As you can see in the Dockerfile, it is "continuing" on top of the Dockerfile that the people behind composer published (specifically, release 1.9.0):

FROM composer:1.9.0

Because of that, we're dependent on what PHP version they decided to use (see here), so there's not a lot you can do about this. As such, the short answer is that it is not possible to specify the PHP version to use with this action.

However..

There is an option that might work with a bit of luck, but it is quite difficult if you're not too familiar with Dockerfiles:

  1. Fork this repository
  2. Copy the contents of the composer Dockerfile
  3. Replace the 1st line ('from:...', see above) of our Dockerfile with the Dockerfile contents you copied at step 2.
  4. Replace the "from: php" line at the top with the specific PHP version you need
  5. Change the following in the Action you configure and hope for the best:
-   - uses: ubient/laravel-vapor-action@master
+   - uses: user/your-forked-repository@branch

I hope this helps you!

Sadly i'm not very familiar with Dockerfile so i will not try it

Thank you anyway for your reply

Hi! I realize this issue has been closed for a while now, but I figured I'd still post an update in case anyone ever lands here via (for example) Google:

This is now supported in a fairly easy-to-use/copy-paste friendly way: https://github.com/ubient/laravel-vapor-action#advanced-usage

Enjoy!