From 884933fb7dbdb3cd8def11d5fd59431ae91bb377 Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:12:59 +0200 Subject: [PATCH] Cache - supported-versions.json hash --- .github/workflows/reusable-CI-workflow.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-CI-workflow.yml b/.github/workflows/reusable-CI-workflow.yml index 9a334eb..d0ac804 100644 --- a/.github/workflows/reusable-CI-workflow.yml +++ b/.github/workflows/reusable-CI-workflow.yml @@ -9,6 +9,7 @@ permissions: env: COMPOSER_PREFER_STABLE: '1' TEST_OUTPUT_STYLE: pretty + SUPPORTED_VERSIONS_FILE_PATH: .github/workflows/supported-versions.json jobs: fetch-supported-versions: @@ -28,7 +29,7 @@ jobs: id: fetch-file uses: yoanm/gha-supported-versions-parser/github-downloader@v1 with: - file-path: .github/workflows/supported-versions.json + file-path: ${{ env.SUPPORTED_VERSIONS_FILE_PATH }} - name: Fetch PHP supported versions id: fetch-php-versions @@ -115,7 +116,7 @@ jobs: path: | ${{ steps.composer-cache.outputs.dir }} # Clear the cache if composer.json (as composer.lock is not available) has been updated - key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }} + key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ matrix.symfony-version }}-${{ hashFiles('composer.json', env.SUPPORTED_VERSIONS_FILE_PATH) }} - name: Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }} run: | @@ -200,7 +201,7 @@ jobs: path: | ${{ steps.composer-cache.outputs.dir }} # Clear the cache if composer.json (as composer.lock is not available) has been updated - key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ env.SYMFONY_VERSION }}-${{ hashFiles('composer.json') }} + key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ env.SYMFONY_VERSION }}-${{ hashFiles('composer.json', env.SUPPORTED_VERSIONS_FILE_PATH) }} - name: Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ env.SYMFONY_VERSION }} run: | @@ -280,7 +281,7 @@ jobs: path: | ${{ steps.composer-cache.outputs.dir }} # Clear the cache if composer.json (as composer.lock is not available) has been updated - key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }} + key: tests-php${{ steps.setup-php.outputs.php-version }}-sf${{ matrix.symfony-version }}-${{ hashFiles('composer.json', env.SUPPORTED_VERSIONS_FILE_PATH) }} - name: Build with PHP ${{ steps.setup-php.outputs.php-version }} & Symfony ${{ matrix.symfony-version }} run: |