diff --git a/.github/workflows/ci.yml b/.github/workflows/build_publish.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/build_publish.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..201f468 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test build Docker image + +on: + pull_request: + schedule: + # Run every day at 10:45 AM UTC to discover potential issues with dependencies like PHP updates etc. + - cron: '45 10 * * *' + +jobs: + build-image: + runs-on: ubuntu-latest + strategy: + matrix: + image_type: [apache, fpm] + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + file: ${{ matrix.image_type }}/Dockerfile + context: . + tags: ${{ matrix.image_type }}-test diff --git a/apache/Dockerfile b/apache/Dockerfile index 339c445..0c4dce9 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -57,7 +57,7 @@ RUN echo "memory_limit = -1" > /usr/local/etc/php/php.ini ARG MAUTIC_VERSION=5.x-dev RUN cd /opt && \ - COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \ + COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \ rm -rf /opt/mautic/var/cache/js && \ find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 2d1fe83..b7943e6 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -57,7 +57,7 @@ RUN echo "memory_limit = -1" > /usr/local/etc/php/php.ini ARG MAUTIC_VERSION=5.x-dev RUN cd /opt && \ - COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \ + COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \ rm -rf /opt/mautic/var/cache/js && \ find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf