diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a09f0d0..19d7d57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,19 @@ -name: Build Docker image - -on: - push: - branches: - - '*' - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Build - uses: docker/build-push-action@v3 - with: - push: false +name: Build Docker image + +on: + push: + branches: + - '*' + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Build + uses: docker/build-push-action@v3 + with: + push: false diff --git a/Dockerfile b/Dockerfile index 22f86b9..745e517 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN apt-get update \ # Install php packages and configure php.ini RUN echo 'memory_limit=256M' > /usr/local/etc/php/conf.d/memory-limit.ini +RUN docker-php-ext-configure gd --with-freetype --with-jpeg RUN docker-php-ext-install intl gd opcache pdo_mysql pdo_pgsql zip RUN pecl install pcov xdebug \ && docker-php-ext-enable pcov xdebug @@ -26,9 +27,9 @@ COPY install_composer.sh install_composer.sh RUN sh install_composer.sh \ && mv composer.phar /usr/local/bin/composer -RUN wget https://github.com/fabpot/local-php-security-checker/releases/download/v1.2.0/local-php-security-checker_1.2.0_linux_amd64 \ - && chmod +x local-php-security-checker_1.2.0_linux_amd64 \ - && mv local-php-security-checker_1.2.0_linux_amd64 /usr/local/bin/local-php-security-checker +RUN wget https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.6/local-php-security-checker_2.0.6_linux_amd64 \ + && chmod +x local-php-security-checker_2.0.6_linux_amd64 \ + && mv local-php-security-checker_2.0.6_linux_amd64 /usr/local/bin/local-php-security-checker # Ansistrano roles for deployment RUN ansible-galaxy install ansistrano.deploy ansistrano.rollback diff --git a/README.md b/README.md index 155876f..5d3ec76 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,24 @@ -![example workflow](https://github.com/appsinet/php_development/actions/workflows/publish.yml/badge.svg) -# php_development -A Docker image based on official PHP, with some extras for development / CI. - -## PHP Modules -- iconv -- intl -- json -- mbstring -- opcache -- pcov -- pdo_mysql -- pdo_pgsql -- xdebug -- xml -- zip - -## Utilities -- composer -- postgresql-client -- local-php-security-checker -- mariadb-client \ No newline at end of file +![example workflow](https://github.com/appsinet/php_development/actions/workflows/publish.yml/badge.svg) +# php_development +A Docker image based on official PHP, with some extras for development / CI. + +## PHP Modules +- intl +- gd +- opcache +- pcov +- pdo_mysql +- pdo_pgsql +- xdebug +- zip + +## Utilities +- ansible +- ansible-lint +- ansistrano +- composer +- local-php-security-checker +- mariadb-client +- node 18 +- postgresql-client +- sentry cli \ No newline at end of file