diff --git a/.github/workflows/php.yaml b/.github/workflows/php.yaml index 92d0ed14bd..6021fdcf74 100644 --- a/.github/workflows/php.yaml +++ b/.github/workflows/php.yaml @@ -61,6 +61,11 @@ jobs: needs: - warm-cache runs-on: ubuntu-latest + container: + image: ghcr.io/dvsa/vol-app/${{ inputs.project }}:latest + # volumes: + # - ${{ github.workspace}}/app/${{ inputs.project }}:/var/www/html + options: --user 1001 defaults: run: working-directory: app/${{ inputs.project }} @@ -73,12 +78,23 @@ jobs: repository: ${{ env.REMOTE_REPOSITORY }} ref: ${{ inputs.ref || null }} path: app/${{ inputs.project }} - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "8.2" - coverage: none - extensions: intl, pdo_mysql, redis, mbstring + - name: Install Composer + run: | + EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + + if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] + then + >&2 echo 'ERROR: Invalid installer checksum' + rm composer-setup.php + exit 1 + fi + + php composer-setup.php --quiet + RESULT=$? + rm composer-setup.php + exit $RESULT - name: Get composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT diff --git a/app/internal/.gitignore b/app/internal/.gitignore index d6b7ef32c8..d826e25df0 100644 --- a/app/internal/.gitignore +++ b/app/internal/.gitignore @@ -1,2 +1,3 @@ * !.gitignore +# Trigger CI.