feat: PHP 8.6 for cac and cac-fpm (Remi php:remi-8.6), per-family version lists in plan-legs
install-php86.sh = install-php85.sh minus php-pecl-geoip (no 8.6 build), fail-loud with extension assertion. plan-legs.sh: per-family lists so cac/cac-fpm get 82-86 while cac-litespeed/cac-lsphp stay 82-85 (no lsphp86). :latest stays on php85. ini files are shared (single prod-php.ini), so 8.5 hardening incl. session.use_strict_mode=0 applies unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
e6e3f1fd48
commit
854042b1c3
5 files changed
+60
-19
No files matched your search
@@ -7,8 +7,9 @@
|
||||
## GITHUB_OUTPUT file the outputs are appended to (set by the runner).
|
||||
##
|
||||
## ONLY is a comma list of tokens (spaces ignored):
|
||||
## cac:php85 cac-fpm:php84 cac-litespeed:php83 cac-lsphp:php82 one leg
|
||||
## cac:php86 cac-fpm:php84 cac-litespeed:php83 cac-lsphp:php82 one leg
|
||||
## cac | cac-fpm | cac-litespeed | cac-lsphp every PHP version of that image
|
||||
## (php86 exists for cac and cac-fpm only; lsphp86 does not exist yet)
|
||||
## shared-httpd | shared-ols that image
|
||||
## Any other token is an error (exit 2, nothing is written): a typo must fail
|
||||
## the plan job loudly, never silently build nothing.
|
||||
@@ -20,7 +21,15 @@ set -euo pipefail
|
||||
|
||||
MATRIX_FAMILIES=(cac cac-fpm cac-litespeed cac-lsphp)
|
||||
SINGLE_FAMILIES=(shared-httpd shared-ols)
|
||||
ALL_PHPVER=(82 83 84 85)
|
||||
# PHP versions per family. cac/cac-fpm (AlmaLinux + Remi) also ship 8.6; the
|
||||
# LiteSpeed families have no lsphp86 package yet, so they stay on 82..85 (a
|
||||
# shared list would make every trunk push build, and fail, litespeed/lsphp php86).
|
||||
declare -A FAM_PHPVER=(
|
||||
[cac]="82 83 84 85 86"
|
||||
[cac-fpm]="82 83 84 85 86"
|
||||
[cac-litespeed]="82 83 84 85"
|
||||
[cac-lsphp]="82 83 84 85"
|
||||
)
|
||||
|
||||
die() { echo "plan-legs: $*" >&2; exit 2; }
|
||||
|
||||
@@ -46,11 +55,11 @@ else
|
||||
fi
|
||||
if [[ " ${MATRIX_FAMILIES[*]} " == *" $fam "* ]]; then
|
||||
if [ -z "$ver" ]; then
|
||||
for v in "${ALL_PHPVER[@]}"; do want_ver["$fam:$v"]=1; done
|
||||
elif [[ "$ver" =~ ^php(8[2-5])$ ]]; then
|
||||
for v in ${FAM_PHPVER[$fam]}; do want_ver["$fam:$v"]=1; done
|
||||
elif [[ "$ver" =~ ^php(8[2-6])$ ]] && [[ " ${FAM_PHPVER[$fam]} " == *" ${BASH_REMATCH[1]} "* ]]; then
|
||||
want_ver["$fam:${BASH_REMATCH[1]}"]=1
|
||||
else
|
||||
die "unknown PHP version in '$t' (want ${fam}:php82 .. ${fam}:php85)"
|
||||
die "unknown PHP version in '$t' (${fam} has: ${FAM_PHPVER[$fam]// /, })"
|
||||
fi
|
||||
elif [[ " ${SINGLE_FAMILIES[*]} " == *" $fam "* ]]; then
|
||||
[ "$fam" = "$t" ] || die "'$t': $fam has a single leg, use plain '$fam'"
|
||||
@@ -64,7 +73,7 @@ fi
|
||||
|
||||
matrix_json() { # family
|
||||
local fam=$1 v out=""
|
||||
for v in "${ALL_PHPVER[@]}"; do
|
||||
for v in ${FAM_PHPVER[$fam]}; do
|
||||
if $want_all || [ -n "${want_ver["$fam:$v"]-}" ]; then out+="${out:+,}$v"; fi
|
||||
done
|
||||
printf '[%s]' "$out"
|
||||
|
||||
@@ -2,7 +2,7 @@ name: Cloud Apache Container
|
||||
run-name: ${{ gitea.actor }} pushed a change to trunk
|
||||
# Manual run. `only` (optional) rebuilds just the named legs instead of every
|
||||
# image: Gitea cannot re-run a single job and a full run takes ~1h.
|
||||
# Syntax: comma list of cac:php85, cac-fpm:php84, cac-litespeed:php83,
|
||||
# Syntax: comma list of cac:php86, cac-fpm:php84, cac-litespeed:php83,
|
||||
# cac-lsphp:php82, shared-httpd, shared-ols; a bare family name (cac) = all its
|
||||
# PHP versions. Empty = everything (same as a push). Unknown values fail the
|
||||
# plan job. See .gitea/scripts/plan-legs.sh.
|
||||
@@ -302,7 +302,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tags=(--tag "php${PHPVER}")
|
||||
# :latest tracks php85 (unchanged tag scheme).
|
||||
# :latest tracks php85 (unchanged tag scheme; php86 is a new tag, NOT latest).
|
||||
[ "$PHPVER" = 85 ] && tags+=(--tag latest)
|
||||
scripts/assemble-multiarch-index.sh \
|
||||
--amd64 "$AMD64_DIGEST" \
|
||||
@@ -471,7 +471,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tags=(--tag "php${PHPVER}")
|
||||
# :latest tracks php85 (unchanged tag scheme).
|
||||
# :latest tracks php85 (unchanged tag scheme; php86 is a new tag, NOT latest).
|
||||
[ "$PHPVER" = 85 ] && tags+=(--tag latest)
|
||||
scripts/assemble-multiarch-index.sh \
|
||||
--amd64 "$AMD64_DIGEST" \
|
||||
|
||||
Reference in new issue
Block a user