Skip to content

Commit a8f4099

Browse files
committed
GH Actions: minor simplification
... of the bash `date` command in the earlier pulled cache busting.
1 parent a9afeb7 commit a8f4099

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/cs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
- name: Install Composer dependencies
5151
uses: "ramsey/composer-install@v2"
5252
with:
53-
# Bust the cache at least once a month - output format: YYYY-MM-DD.
54-
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
53+
# Bust the cache at least once a month - output format: YYYY-MM.
54+
custom-cache-suffix: $(date -u "+%Y-%m")
5555

5656
# @link http://xmlsoft.org/xmllint.html
5757
- name: Install xmllint

.github/workflows/quicktest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ jobs:
7373
- name: Install Composer dependencies
7474
uses: "ramsey/composer-install@v2"
7575
with:
76-
# Bust the cache at least once a month - output format: YYYY-MM-DD.
77-
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
76+
# Bust the cache at least once a month - output format: YYYY-MM.
77+
custom-cache-suffix: $(date -u "+%Y-%m")
7878

7979
- name: Lint against parse errors (PHP 7.2+)
8080
if: ${{ matrix.phpcs_version == 'dev-master' && matrix.php >= '7.2' }}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ jobs:
107107
if: ${{ matrix.php < 8.2 }}
108108
uses: "ramsey/composer-install@v2"
109109
with:
110-
# Bust the cache at least once a month - output format: YYYY-MM-DD.
111-
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
110+
# Bust the cache at least once a month - output format: YYYY-MM.
111+
custom-cache-suffix: $(date -u "+%Y-%m")
112112

113113
# For PHP "nightly", we need to install with ignore platform reqs as not all dependencies allow installation.
114114
- name: Install Composer dependencies - with ignore platform
115115
if: ${{ matrix.php >= 8.2 }}
116116
uses: "ramsey/composer-install@v2"
117117
with:
118118
composer-options: --ignore-platform-reqs
119-
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")
119+
custom-cache-suffix: $(date -u "+%Y-%m")
120120

121121
- name: Lint against parse errors (PHP 7.2+)
122122
if: ${{ matrix.phpcs_version == 'dev-master' && matrix.php >= '7.2' }}

0 commit comments

Comments
 (0)