Skip extensions cache if there are no extensions to install

This commit is contained in:
Alejandro Celaya 2024-02-16 23:10:18 +01:00
parent 8c93444286
commit 8015c6cc88

View File

@ -20,6 +20,7 @@ runs:
using: composite
steps:
- name: Setup cache environment
if: ${{ inputs.php-extensions }}
id: extcache
uses: shivammathur/cache-extensions@v1
with:
@ -27,7 +28,8 @@ runs:
extensions: ${{ inputs.php-extensions }}
key: ${{ inputs.extensions-cache-key }}
- name: Cache extensions
uses: actions/cache@v3
if: ${{ inputs.php-extensions }}
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}