Skip to content

Commit 98a9c1f

Browse files
committed
Cache - supported-versions.json hash
1 parent 6c5c8db commit 98a9c1f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/reusable-CI-workflow.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permissions:
99
env:
1010
COMPOSER_PREFER_STABLE: '1'
1111
TEST_OUTPUT_STYLE: pretty
12+
SUPPORTED_VERSIONS_FILE_PATH: .github/workflows/supported-versions.json
1213

1314
jobs:
1415
fetch-supported-versions:
@@ -25,7 +26,7 @@ jobs:
2526
id: fetch-file
2627
uses: yoanm/gha-supported-versions-parser/github-downloader@v1
2728
with:
28-
file-path: .github/workflows/supported-versions.json
29+
file-path: ${{ env.SUPPORTED_VERSIONS_FILE_PATH }}
2930

3031
- name: Fetch PHP supported versions
3132
id: fetch-php-versions
@@ -83,7 +84,7 @@ jobs:
8384
path: |
8485
${{ steps.composer-cache.outputs.dir }}
8586
# Clear the cache if composer.json (as composer.lock is not available) has been updated
86-
key: tests-php${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('composer.json') }}
87+
key: tests-php${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('composer.json', env.SUPPORTED_VERSIONS_FILE_PATH) }}
8788

8889
- name: Build with PHP ${{ steps.setup-php.outputs.php-version }}
8990
run: make build
@@ -157,7 +158,7 @@ jobs:
157158
path: |
158159
${{ steps.composer-cache.outputs.dir }}
159160
# Clear the cache if composer.json (as composer.lock is not available) has been updated
160-
key: tests-php${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('composer.json') }}
161+
key: tests-php${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('composer.json', env.SUPPORTED_VERSIONS_FILE_PATH) }}
161162

162163
- name: Build with PHP ${{ steps.setup-php.outputs.php-version }}
163164
run: make build
@@ -204,7 +205,7 @@ jobs:
204205
path: |
205206
${{ steps.composer-cache.outputs.dir }}
206207
# Clear the cache if composer.json (as composer.lock is not available) has been updated
207-
key: tests-php${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('composer.json') }}
208+
key: tests-php${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('composer.json', env.SUPPORTED_VERSIONS_FILE_PATH) }}
208209

209210
- name: Build with PHP ${{ steps.setup-php.outputs.php-version }}
210211
run: make build

0 commit comments

Comments
 (0)