diff --git a/.github/workflows/build-php-images.yml b/.github/workflows/build-php-images.yml index 8e92650..0d0c6a9 100644 --- a/.github/workflows/build-php-images.yml +++ b/.github/workflows/build-php-images.yml @@ -101,26 +101,14 @@ jobs: setup.skipCommonPlugins=true setup.plugins.@lando/php=/home/runner/work/php/php telemetry: false - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the Lagoon mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - # Test newly built images. - name: Test Edge Images on PR + uses: lando/run-leia-action@v2 if: ${{ github.event_name == 'pull_request' }} - shell: bash - run: | - yarn leia "./examples/images-edge/${{ matrix.tag }}/README.md" -c 'Destroy tests' --stdin --shell bash + with: + leia-test: "./examples/images-edge/${{ matrix.tag }}/README.md" - name: Test Stable Images on Push - if: ${{ github.event_name == 'push' }} - shell: bash - run: | - yarn leia "./examples/images-stable/${{ matrix.tag }}/README.md" -c 'Destroy tests' --stdin --shell bash + uses: lando/run-leia-action@v2 + if: ${{ github.event_name == 'pull_request' }} + with: + leia-test: "./examples/images-stable/${{ matrix.tag }}/README.md" diff --git a/builders/php.js b/builders/php.js index ab3d204..ecde4b8 100644 --- a/builders/php.js +++ b/builders/php.js @@ -63,7 +63,7 @@ const parseCli = options => { */ const parseNginx = options => { options.command = (process.platform !== 'win32') ? ['php-fpm'] : ['php-fpm -R']; - options.image = 'fpm'; + options.phpServer = 'fpm'; options.remoteFiles.vhosts = '/opt/bitnami/nginx/conf/lando.conf'; options.defaultFiles.vhosts = (options.ssl) ? 'default-ssl.conf.tpl' : 'default.conf.tpl'; options.nginxSsl = options.ssl; @@ -110,7 +110,7 @@ module.exports = { confSrc: path.resolve(__dirname, '..', 'config'), command: ['sh -c \'a2enmod rewrite && apache2-foreground\''], composer_version: '2.2.18', - image: 'apache', + phpServer: 'apache', defaultFiles: { _php: 'php.ini', vhosts: 'default.conf', @@ -155,7 +155,8 @@ module.exports = { // Build the php const php = { - image: `devwithlando/php:${options.version}-${options.image}-${options.suffix}`, + image: _.get(options, 'image') ? + options.image : `devwithlando/php:${options.version}-${options.phpServer}-${options.suffix}`, environment: _.merge({}, options.environment, { PATH: options.path.join(':'), LANDO_WEBROOT: `/app/${options.webroot}`,