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