ci updates

This commit is contained in:
Robin Appelman 2025-05-23 18:47:29 +02:00
commit fc653c1021
2 changed files with 17 additions and 16 deletions

View file

@ -3,10 +3,10 @@ name: docker-build
on:
push:
branches:
- 'master'
- 'main'
- "master"
- "main"
repository_dispatch:
types: [ build ]
types: [build]
jobs:
docker:
@ -15,22 +15,20 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.1', '8.2', '8.3', '8.4']
variant: ['cli', 'apache', 'fpm']
base: ['bookworm', 'bullseye']
php-versions: ["8.1", "8.2", "8.3", "8.4"]
variant: ["cli", "apache", "fpm"]
base: ["bookworm", "bullseye"]
steps:
- name: Checkout patch files
uses: actions/checkout@v4
- name: Checkout base dockerfiles
uses: actions/checkout@v4
with:
path: php
repository: docker-library/php
run: |
git clone --depth 1 https://github.com/docker-library/php
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: https://github.com/docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@ -42,7 +40,7 @@ jobs:
cd php; ./apply-templates.sh
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
uses: https://github.com/docker/build-push-action@v5
with:
context: php/${{ matrix.php-versions }}/${{ matrix.base }}/${{ matrix.variant }}
push: true

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ ! -d php ]; then
git clone https://github.com/docker-library/php
@ -6,9 +6,12 @@ fi
patch -N -p1 -d php < debug.patch
versions=("8.1" "8.2" "8.3")
versions=("8.4")
cd php; DOCKER_PHP_ENABLE_DEBUG=1 ./apply-templates.sh
(
cd php
DOCKER_PHP_ENABLE_DEBUG=1 ./apply-templates.sh
)
for version in "${versions[@]}"; do
docker build -t icewind1991/php-debug:$version-fpm -f php/$version/bullseye/fpm/Dockerfile php/$version/bullseye/fpm