Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeraymonddowning committed Sep 21, 2024
1 parent 69497dd commit 05b3034
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/actions/setup-tooling/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,29 @@ inputs:
php-version:
description: The version(s) of PHP you want to configure.
default: '8.3'
php-extensions:
description: The PHP extensions to install.
default: dom, curl, libxml, mbstring, zip, pcntl, pdo, gd, redis, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp, :php-psr

runs:
using: composite

env:
CACHE_KEY: extension-cache-v1
PHP_EXTENSIONS: dom, curl, libxml, mbstring, zip, pcntl, pdo, gd, redis, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp, :php-psr
PHP_EXTENSIONS:

steps:
- name: Get extension cache hash
id: extension-cache-hash
run: echo hash=$(md5sum >> $INPUT_PHP-EXTENSIONS) >> $GITHUB_OUTPUT

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ env.INPUT_PHP-VERSION }}
extensions: ${{ env.PHP_EXTENSIONS }}
key: ${{ env.CACHE_KEY }}
extensions: ${{ env.INPUT_PHP-EXTENSIONS }}
key: ${{ steps.extension-cache-hash.outputs.hash }}

- name: Cache extensions
uses: actions/cache@v4
Expand All @@ -34,7 +41,7 @@ runs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.INPUT_PHP-VERSION }}
extensions: ${{ env.PHP_EXTENSIONS }}
extensions: ${{ env.INPUT_PHP-EXTENSIONS }}
tools: composer:v2

- name: Get Composer cache dir
Expand Down

0 comments on commit 05b3034

Please sign in to comment.