Skip to content

Commit cd79216

Browse files
authored
Merge pull request #192 from PHPCSStandards/feature/ghactions-cache-busting
GH Actions: bust the cache semi-regularly
2 parents 10e9bba + 5c410c7 commit cd79216

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.github/workflows/integrationtest.yml

+3
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,15 @@ jobs:
127127
uses: "ramsey/composer-install@v2"
128128
with:
129129
composer-options: '--optimize-autoloader'
130+
# Bust the cache at least once a month - output format: YYYY-MM-DD.
131+
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
130132

131133
- name: Install Composer dependencies
132134
if: ${{ matrix.php == '8.2' }}
133135
uses: "ramsey/composer-install@v2"
134136
with:
135137
composer-options: '--ignore-platform-reqs --optimize-autoloader'
138+
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
136139

137140
- name: Run integration tests
138141
run: vendor/bin/phpunit --no-coverage

.github/workflows/phplint.yml

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
# @link https://github.com/marketplace/actions/install-composer-dependencies
3939
- name: Install Composer dependencies
4040
uses: "ramsey/composer-install@v2"
41+
with:
42+
# Bust the cache at least once a month - output format: YYYY-MM-DD.
43+
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
4144

4245
- name: Lint against parse errors
4346
run: composer lint -- --checkstyle | cs2pr

.github/workflows/quicktest.yml

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
uses: "ramsey/composer-install@v2"
6161
with:
6262
composer-options: '--optimize-autoloader'
63+
# Bust the cache at least once a month - output format: YYYY-MM-DD.
64+
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
6365

6466
- name: Run integration tests
6567
run: vendor/bin/phpunit --no-coverage

.github/workflows/securitycheck.yml

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
# @link https://github.com/marketplace/actions/install-composer-dependencies
3737
- name: Install Composer dependencies
3838
uses: "ramsey/composer-install@v2"
39+
with:
40+
# Bust the cache at least once a month - output format: YYYY-MM-DD.
41+
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
3942

4043
- name: Download security checker
4144
# yamllint disable-line rule:line-length

0 commit comments

Comments
 (0)