Skip to content

Commit 1dac73f

Browse files
committed
fix(ci): improve composer cache restore strategy and trigger release
- add branch-specific and main branch fallback keys to cache restore steps - update cache configuration in QA and Tests jobs to maximize cache hits
1 parent ae84f08 commit 1dac73f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ jobs:
2929
with:
3030
path: "${{ env.COMPOSER_CACHE_DIR }}"
3131
key: "php-8.3-composer-locked-${{ hashFiles('composer.lock') }}"
32-
restore-keys: "php-8.3-composer-locked-"
32+
restore-keys: |
33+
php-8.3-composer-locked-${{ github.ref_name }}
34+
php-8.3-composer-locked-
35+
php-8.3-composer-main
3336
3437
- name: "Install locked dependencies with composer"
3538
uses: "ergebnis/.github/actions/composer/install@4103ff7c010d2c18dc84f72d6704227868412482" # 1.10.0
@@ -84,7 +87,10 @@ jobs:
8487
with:
8588
path: "${{ env.COMPOSER_CACHE_DIR }}"
8689
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
87-
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
90+
restore-keys: |
91+
php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ github.ref_name }}
92+
php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
93+
php-${{ matrix.php-version }}-composer-main
8894
8995
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
9096
uses: "ergebnis/.github/actions/composer/install@4103ff7c010d2c18dc84f72d6704227868412482" # 1.10.0

0 commit comments

Comments
 (0)