File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,10 @@ jobs:
106106 run : |
107107 export PATH="$PATH:$HOME/.composer/vendor/bin"
108108 PHP_CONSTRAINT=$(jq -r '.require.php' composer.json)
109- # Get all PHP tags from Docker Hub (paginated, up to 1000 tags )
110- TAGS =$(curl -s 'https://registry.hub.docker.com/v2/repositories/library/ php/tags?page_size =1000' | jq -r '.results[].name ')
111- # Filter for fpm-alpine tags and extract version numbers
112- VERSIONS=$(echo "$TAGS " | grep -E '^[0-9]+\.[0-9]+( \.[0-9]+)?-fpm-alpine$' | sed 's/-fpm-alpine// ' | sort -V)
109+ # Fetch all PHP releases from php.net (JSON )
110+ RELEASES =$(curl -s 'https://www.php.net/releases/index. php?json&max =1000')
111+ # Extract all version fields from the JSON and sort
112+ VERSIONS=$(echo "$RELEASES " | jq -r '.[] | select(.version != null) | .version' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$ ' | sort -V)
113113 # Use composer/semver to find the highest matching version
114114 MATCH=$(echo "$VERSIONS" | xargs -I{} semver "$PHP_CONSTRAINT" {} | tail -n1)
115115 if [ -z "$MATCH" ]; then
You can’t perform that action at this time.
0 commit comments