feat: make cache key consistent (and configurable) (#38)

This commit is contained in:
Damien Retzinger
2022-08-13 14:39:00 -04:00
committed by GitHub
parent 841670a97f
commit cbbba628dd
4 changed files with 25 additions and 13 deletions
+7 -1
View File
@@ -41,6 +41,12 @@ on:
default: ../../../vendor/bin/phpunit
description: "The integration test command to run"
composer_cache_key:
type: string
required: false
default: ''
description: A key to version the composer cache. Can be incremented if you need to bust the cache.
secrets:
composer_auth:
required: false
@@ -117,7 +123,7 @@ jobs:
- name: "Cache Composer Packages"
uses: actions/cache@v3
with:
key: 'composer | v3 | "$(Agent.OS)" | composer.lock | ${{ matrix.composer }} | ${{ matrix.php }} | ${{ matrix.magento }}'
key: "composer | v4 | ${{ inputs.composer_cache_key }} | ${{ hashFiles('composer.lock') }} | ${{ matrix.os }} | ${{ matrix.composer }} | ${{ matrix.php }} | ${{ matrix.magento }}"
path: ${{ steps.composer-cache.outputs.dir }}
- run: composer config repositories.local path ${{ inputs.source_folder }}