ci: use php container image instead of setup-php action
This commit is contained in:
1 parent
8040506736
commit
c15015d809
1 file changed
+19
-8
@@ -16,16 +16,27 @@ jobs:
|
||||
|
||||
name: PHP ${{ matrix.php }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# The PHP version comes from the job container image instead of shivammathur/setup-php:
|
||||
# the runner in this Gitea instance reaches github.com intermittently and setup-php
|
||||
# failed with "TLS handshake timeout". Fewer external actions, fewer failure modes.
|
||||
container: php:${{ matrix.php }}-cli
|
||||
|
||||
- name: Set up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
steps:
|
||||
- name: Install system packages
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq --no-install-recommends git unzip libonig-dev libxml2-dev > /dev/null
|
||||
docker-php-ext-install -j"$(nproc)" mbstring pdo pdo_mysql > /dev/null
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: mbstring, pdo, pdo_mysql, json
|
||||
coverage: none
|
||||
tools: composer:v2
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Composer
|
||||
run: |
|
||||
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
|
||||
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --quiet
|
||||
composer --version
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer update --prefer-dist --no-interaction --no-progress
|
||||
|
||||
Reference in new issue
Block a user