CI: create custom Docker image for faster builds
All checks were successful
Deploy / Deploy to Production (push) Successful in 11s
All checks were successful
Deploy / Deploy to Production (push) Successful in 11s
Add Dockerfile.ci with PHP 8.3, Composer, and GD extension pre-installed. Update workflow to use this custom image instead of rebuilding environment on each run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a06fad1c86
commit
55c3ba94e8
2 changed files with 22 additions and 18 deletions
|
|
@ -10,25 +10,8 @@ jobs:
|
||||||
name: Deploy to Production
|
name: Deploy to Production
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: php:8.3-cli
|
image: forgejo-ci-php:latest
|
||||||
steps:
|
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
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 --branch main https://forge.studio-variable.com/${{ github.repository }}.git .
|
git clone --depth 1 --branch main https://forge.studio-variable.com/${{ github.repository }}.git .
|
||||||
|
|
|
||||||
21
Dockerfile.ci
Normal file
21
Dockerfile.ci
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue