Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run app CI in PHP images #152

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions app/internal/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*
!.gitignore
# Trigger CI.
Loading