diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 1aa0056..67cc286 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -10,25 +10,8 @@ jobs: name: Deploy to Production runs-on: docker container: - image: php:8.3-cli + image: forgejo-ci-php:latest steps: - - name: Install system dependencies and PHP extensions - run: | - apt-get update && apt-get install -y --no-install-recommends \ - libfreetype6-dev \ - libjpeg62-turbo-dev \ - libpng-dev \ - unzip \ - git \ - curl \ - && docker-php-ext-configure gd --with-freetype --with-jpeg \ - && docker-php-ext-install -j$(nproc) gd \ - && rm -rf /var/lib/apt/lists/* - - - name: Install Composer - run: | - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - - name: Checkout code run: | git clone --depth 1 --branch main https://forge.studio-variable.com/${{ github.repository }}.git . diff --git a/Dockerfile.ci b/Dockerfile.ci new file mode 100644 index 0000000..6b83053 --- /dev/null +++ b/Dockerfile.ci @@ -0,0 +1,21 @@ +FROM php:8.3-cli + +# Install system dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + unzip \ + git \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Install and configure GD extension +RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) gd + +# Install Composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +# Set working directory +WORKDIR /workspace