extdn / github-actions-m2

137 stars 46 forks source link

PHPStan. Add support to change repository url #80

Open rybkinevg opened 1 year ago

rybkinevg commented 1 year ago

Hello!

I store my modules as a packages in the private packagist and I faced the problem with PHPStan action: when action is running it tries to download package dependency and falls down with error, cause this package is in the private packagist.

Example of the composer.json file:

{
    "name": "vedor/module-foo-bar",
    "type": "magento2-module",
    "require": {
        "magento/framework": "*",
        "vendor/module-from-private-packagist": "*"
    },
}

As I can see, the repository variable is installing in the some places here, here and lastly here.

It would be great to pass the REPOSITORY_URL and COMPOSER_AUTH as environment variables same as we are installing them into integration tests action like this:

jobs:
  integration-tests:
    env:
      REPOSITORY_URL: ${{ secrets.REPOSITORY_URL }}
      COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}