Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow PHP version to be set via argument #34

Open
longwave opened this issue Jul 4, 2024 · 3 comments
Open

Allow PHP version to be set via argument #34

longwave opened this issue Jul 4, 2024 · 3 comments

Comments

@longwave
Copy link

longwave commented Jul 4, 2024

When using this as CI, sometimes you want a matrix of different PHP versions to test against. To do this at the moment you need to disable autostart, set the version, and then manually start, e.g.

      - uses: ddev/github-action-setup-ddev@v1
        with:
          autostart: false

      - name: Setup PHP Version
        run: ddev config --php-version ${{ matrix.php }}

      - name: Start ddev
        run: ddev start

It would be nicer DX if we could just say

      - uses: ddev/github-action-setup-ddev@v1
        with:
          php-version: ${{ matrix.php }}
@alexpott
Copy link

alexpott commented Jul 4, 2024

Maybe it should be more flexible something like:

      - uses: ddev/github-action-setup-ddev@v1
        with:
          before-start:
            - ddev config --php-version ${{ matrix.php }}
            - ddev config --something-else ${{ matrix.something }}

Like PHP is just 1 thing you might want to vary by....

@donquixote
Copy link

Or could we have a config: key for config overrides?
This would have the same structure as the config.yaml file.

      - uses: ddev/github-action-setup-ddev@v1
        with:
          ddev-config:
            php_version: ${{ matrix.php }}

@donquixote
Copy link

There could be another key for extensions.

      - uses: ddev/github-action-setup-ddev@v1
        with:
          ddev-get:
            - ddev/ddev-drupal-contrib
            - ddev/ddev-selenium-standalone-chrome
          ddev-config:
            php_version: ${{ matrix.php }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants