Generate GitHub Actions Config for Laravel Projects with Ghygen


February 25th, 2021


Ghygen is a GitHub actions configurator for your Laravel applications. The project features an open-source Laravel app to run locally to generate an action.yml file via a GUI.

Ghygen YAML Demo Output

Once you configure the actions you want in your app, you can generate the YAML and copy/paste it into your project's actions.yml file.

Here are some of the things you can configure via the GUI for your projects:

  • select triggering events: manually or automatically, when the developer push the code on a specific branch, or a developer create a new Pull Request;
  • select branches;
  • enable caching for all vendors;
  • enable caching PHP packages;
  • select multiple PHP versions (8.0, 7.4, 7.3);
  • select multiple Laravel versions (8, 7, 6), useful if you are developing a Laravel Package and you want to test it with multiple Laravel version;
  • select Node version for NPM (npm run something);
  • caching node packages;
  • setup Mysql service;
  • run migrations;
  • execute tests via phpunit;
  • static code analysis;
  • code sniffer (via phpcs for PSR12 compatibility);
  • validate Yaml file;
  • execute Browser Test via Laravel Dusk.

Be sure to check out the latest readme as this is a work in progress, and things will likely change as new features are added. You can learn more about this project, get full installation instructions, and view the source code on GitHub.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.