Merge pull request #2821 from jrfnl/feature/ghactions-cache-busting

GH Actions: bust the cache semi-regularly
This commit is contained in:
Marcus Bointon 2022-11-04 23:33:13 +01:00 committed by GitHub
commit f8d9b332bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,9 @@ jobs:
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
with:
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
- name: Check coding standards
id: phpcs
@ -67,6 +70,9 @@ jobs:
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies
uses: "ramsey/composer-install@v2"
with:
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
- name: Lint against parse errors
if: ${{ matrix.php != '8.2' }}
@ -119,12 +125,17 @@ jobs:
- name: Install PHP packages - normal
if: ${{ matrix.php != '8.2' }}
uses: "ramsey/composer-install@v2"
with:
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
- name: Install PHP packages - ignore-platform-reqs
if: ${{ matrix.php == '8.2' }}
uses: "ramsey/composer-install@v2"
with:
composer-options: --ignore-platform-reqs
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
# Install postfix and automatically retry if the install failed, which happens reguarly.
# @link https://github.com/marketplace/actions/retry-step