Skip to content

Commit 4a8fa4f

Browse files
committed
Add caching for the /gutenberg directory
1 parent 5b7a3ad commit 4a8fa4f

9 files changed

Lines changed: 90 additions & 0 deletions

.github/workflows/reusable-build-package.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ jobs:
3434
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
3535
persist-credentials: false
3636

37+
- name: Retrieve the pinned Gutenberg SHA value
38+
id: gutenberg-pinned-ref
39+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
40+
41+
- name: Configure caching for Gutenberg directory.
42+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
43+
with:
44+
path: 'gutenberg'
45+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
46+
3747
- name: Set up Node.js
3848
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3949
with:

.github/workflows/reusable-check-built-files.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ jobs:
4141
with:
4242
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
4343

44+
- name: Retrieve the pinned Gutenberg SHA value
45+
id: gutenberg-pinned-ref
46+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
47+
48+
- name: Configure caching for Gutenberg directory.
49+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
50+
with:
51+
path: 'gutenberg'
52+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
53+
4454
- name: Set up Node.js
4555
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4656
with:

.github/workflows/reusable-coding-standards-javascript.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ jobs:
3939
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
4040
persist-credentials: false
4141

42+
- name: Retrieve the pinned Gutenberg SHA value
43+
id: gutenberg-pinned-ref
44+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
45+
46+
- name: Configure caching for Gutenberg directory.
47+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
48+
with:
49+
path: 'gutenberg'
50+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
51+
4252
- name: Set up Node.js
4353
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4454
with:

.github/workflows/reusable-end-to-end-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ jobs:
8181
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
8282
persist-credentials: false
8383

84+
- name: Retrieve the pinned Gutenberg SHA value
85+
id: gutenberg-pinned-ref
86+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
87+
88+
- name: Configure caching for Gutenberg directory.
89+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
90+
with:
91+
path: 'gutenberg'
92+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
93+
8494
- name: Set up Node.js
8595
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
8696
with:

.github/workflows/reusable-javascript-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ jobs:
4040
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
4141
persist-credentials: false
4242

43+
- name: Retrieve the pinned Gutenberg SHA value
44+
id: gutenberg-pinned-ref
45+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
46+
47+
- name: Configure caching for Gutenberg directory.
48+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
49+
with:
50+
path: 'gutenberg'
51+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
52+
4353
- name: Set up Node.js
4454
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4555
with:

.github/workflows/reusable-performance-test-v2.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ jobs:
121121
fetch-depth: ${{ github.event_name == 'workflow_dispatch' && '2' || '1' }}
122122
persist-credentials: false
123123

124+
- name: Retrieve the pinned Gutenberg SHA value
125+
id: gutenberg-pinned-ref
126+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
127+
128+
- name: Configure caching for Gutenberg directory.
129+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
130+
with:
131+
path: 'gutenberg'
132+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
133+
124134
- name: Set up Node.js
125135
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
126136
with:

.github/workflows/reusable-phpunit-tests-v3.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,16 @@ jobs:
136136
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
137137
persist-credentials: false
138138

139+
- name: Retrieve the pinned Gutenberg SHA value
140+
id: gutenberg-pinned-ref
141+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
142+
143+
- name: Configure caching for Gutenberg directory.
144+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
145+
with:
146+
path: 'gutenberg'
147+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
148+
139149
- name: Set up Node.js
140150
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
141151
with:

.github/workflows/reusable-test-core-build-process.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ jobs:
7575
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
7676
persist-credentials: false
7777

78+
- name: Retrieve the pinned Gutenberg SHA value
79+
id: gutenberg-pinned-ref
80+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
81+
82+
- name: Configure caching for Gutenberg directory.
83+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
84+
with:
85+
path: 'gutenberg'
86+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
87+
7888
# This date is used to ensure that the PHPCS cache is cleared at least once every week.
7989
# http://man7.org/linux/man-pages/man1/date.1.html
8090
- name: "Get last Monday's date"

.github/workflows/reusable-test-local-docker-environment-v1.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ jobs:
9191
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
9292
persist-credentials: false
9393

94+
- name: Retrieve the pinned Gutenberg SHA value
95+
id: gutenberg-pinned-ref
96+
run: echo "ref=$(jq -r '.gutenberg.ref' package.json)" >> $GITHUB_OUTPUT
97+
98+
- name: Configure caching for Gutenberg directory.
99+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
100+
with:
101+
path: 'gutenberg'
102+
key: gutenberg-${{ steps.gutenberg-pinned-ref.outputs.ref }}
103+
94104
- name: Set up Node.js
95105
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
96106
with:

0 commit comments

Comments
 (0)