@@ -220,6 +220,51 @@ jobs:
220220 echo "version=${VERSION}" >> $GITHUB_OUTPUT
221221 echo "TiDB version for this test: ${VERSION}"
222222
223+ - name : Set up Docker Buildx for TiDB
224+ if : contains(matrix.target, 'tidb')
225+ uses : docker/setup-buildx-action@v3
226+
227+ - name : Cache TiDB Docker images using Buildx
228+ if : contains(matrix.target, 'tidb')
229+ uses : docker/build-push-action@v5
230+ with :
231+ context : .
232+ file : Dockerfile.tidb
233+ push : false
234+ tags : pingcap/tidb:v${{ steps.extract-tidb-version.outputs.version }}
235+ build-args : |
236+ TIDB_COMPONENT=pingcap/tidb
237+ TIDB_VERSION=v${{ steps.extract-tidb-version.outputs.version }}
238+ cache-from : type=gha,scope=tidb-v${{ steps.extract-tidb-version.outputs.version }}
239+ cache-to : type=gha,mode=max,scope=tidb-v${{ steps.extract-tidb-version.outputs.version }}
240+
241+ - name : Cache PD Docker image using Buildx
242+ if : contains(matrix.target, 'tidb')
243+ uses : docker/build-push-action@v5
244+ with :
245+ context : .
246+ file : Dockerfile.tidb
247+ push : false
248+ tags : pingcap/pd:v${{ steps.extract-tidb-version.outputs.version }}
249+ build-args : |
250+ TIDB_COMPONENT=pingcap/pd
251+ TIDB_VERSION=v${{ steps.extract-tidb-version.outputs.version }}
252+ cache-from : type=gha,scope=pd-v${{ steps.extract-tidb-version.outputs.version }}
253+ cache-to : type=gha,mode=max,scope=pd-v${{ steps.extract-tidb-version.outputs.version }}
254+
255+ - name : Cache TiKV Docker image using Buildx
256+ if : contains(matrix.target, 'tidb')
257+ uses : docker/build-push-action@v5
258+ with :
259+ context : .
260+ file : Dockerfile.tidb
261+ push : false
262+ tags : pingcap/tikv:v${{ steps.extract-tidb-version.outputs.version }}
263+ build-args : |
264+ TIDB_COMPONENT=pingcap/tikv
265+ TIDB_VERSION=v${{ steps.extract-tidb-version.outputs.version }}
266+ cache-from : type=gha,scope=tikv-v${{ steps.extract-tidb-version.outputs.version }}
267+ cache-to : type=gha,mode=max,scope=tikv-v${{ steps.extract-tidb-version.outputs.version }}
223268
224269 - name : Run tests {{ matrix.target }}
225270 env :
0 commit comments