Skip to content

chore(deps): update terraform github.com/cds-snc/terraform-modules to v9.4.8 #2542

chore(deps): update terraform github.com/cds-snc/terraform-modules to v9.4.8

chore(deps): update terraform github.com/cds-snc/terraform-modules to v9.4.8 #2542

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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- 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"