chore(deps): update httpd:2.4-alpine docker digest to b64b573 (#1977) #3008
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check PHP version match | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
check-php-version-match: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set PHP target version from .wp-env.json | |
run: | | |
PHP_VERSION="$(cat .wp-env.json | jq -r .phpVersion)" | |
echo "PHP_VERSION=$PHP_VERSION" >> $GITHUB_ENV | |
- name: Check PHP version of WordPress composer.json files | |
working-directory: wordpress | |
run: | | |
find . -name "composer.json" -print0 | while read -d $'\0' COMPOSER; do | |
CURR_VERSION="$(cat $COMPOSER | jq -r .config.platform.php)" | |
if [ "$CURR_VERSION" != "${{ env.PHP_VERSION }}" ]; then | |
echo "💩 PHP version does not match ${{ env.PHP_VERSION }} in $COMPOSER: $CURR_VERSION" | |
exit 1 | |
fi | |
done | |
- name: Check PHP version in GitHub workflows | |
working-directory: .github/workflows | |
run: | | |
grep -r "php-version:" --exclude=check-php-version.yml *.yml | while read WORKFLOW; do | |
CURR_VERSION="$(echo $WORKFLOW | awk -F' ' '{ print $3 }')" | |
if [ "$CURR_VERSION" != "${{ env.PHP_VERSION }}" ]; then | |
echo "💩 PHP version does not match ${{ env.PHP_VERSION }} in $WORKFLOW" | |
exit 1 | |
fi | |
done | |
- name: Check PHP version in WordPress Dockerfile | |
working-directory: wordpress/docker | |
run: | | |
cat Dockerfile | grep -E "FROM wordpress:[0-9\.]+-php${{ env.PHP_VERSION }}-fpm-alpine" |