@@ -204,10 +204,6 @@ jobs:
204204 with :
205205 platforms : all
206206
207- - name : Set up Docker Buildx
208- id : buildx
209- uses : docker/setup-buildx-action@master
210-
211207 - name : Login to DockerHub
212208 if : github.event_name != 'pull_request'
213209 uses : docker/login-action@v3
@@ -227,7 +223,6 @@ jobs:
227223 uses : docker/build-push-action@v6
228224 if : github.event_name != 'pull_request'
229225 with :
230- builder : ${{ steps.buildx.outputs.name }}
231226 # The build-args MUST be an EXACT match between the image cache and other workflow steps that want to use that cache.
232227 # This means that even the MAKEFLAGS have to be an EXACT match.
233228 # If the build-args are not an EXACT match, it will result in a cache miss, which will require GRPC to be built from scratch.
@@ -243,19 +238,20 @@ jobs:
243238 GRPC_VERSION=v1.65.0
244239 MAKEFLAGS=${{ inputs.makeflags }}
245240 SKIP_DRIVERS=${{ inputs.skip-drivers }}
246- context : .
247- file : ./Dockerfile
248- cache-from : type=gha
249- platforms : ${{ inputs.platforms }}
241+ build- context : .
242+ build- file : ./Dockerfile
243+ cache : true
244+ build- platforms : ${{ inputs.platforms }}
250245 push : ${{ github.event_name != 'pull_request' }}
251- tags : ${{ steps.meta.outputs.tags }}
252- labels : ${{ steps.meta.outputs.labels }}
246+ meta- tags : ${{ steps.meta.outputs.tags }}
247+ meta- labels : ${{ steps.meta.outputs.labels }}
253248# ## Start testing image
254249 - name : Build and push
255- uses : docker/build-push-action@v6
250+ # uses: docker/build-push-action@v6
251+ # See: https://github.com/docker/build-push-action/issues/671
252+ uses : crazy-max/.github/.github/workflows/build-distribute-mp.yml@main
256253 if : github.event_name == 'pull_request'
257254 with :
258- builder : ${{ steps.buildx.outputs.name }}
259255 # The build-args MUST be an EXACT match between the image cache and other workflow steps that want to use that cache.
260256 # This means that even the MAKEFLAGS have to be an EXACT match.
261257 # If the build-args are not an EXACT match, it will result in a cache miss, which will require GRPC to be built from scratch.
@@ -271,43 +267,45 @@ jobs:
271267 GRPC_VERSION=v1.65.0
272268 MAKEFLAGS=${{ inputs.makeflags }}
273269 SKIP_DRIVERS=${{ inputs.skip-drivers }}
274- context : .
275- file : ./Dockerfile
276- cache-from : type=gha
277- platforms : ${{ inputs.platforms }}
278- # push: true
279- tags : ${{ steps.meta_pull_request .outputs.tags }}
280- labels : ${{ steps.meta_pull_request .outputs.labels }}
270+ build- context : .
271+ build- file : ./Dockerfile
272+ cache : true
273+ build- platforms : ${{ inputs.platforms }}
274+ push : ${{ github.event_name != 'pull_request' }}
275+ meta- tags : ${{ steps.meta .outputs.tags }}
276+ meta- labels : ${{ steps.meta .outputs.labels }}
281277# # End testing image
282278 - name : Build and push AIO image
283279 if : inputs.aio != ''
284- uses : docker/build-push-action@v6
280+ # uses: docker/build-push-action@v6
281+ uses : crazy-max/.github/.github/workflows/build-distribute-mp.yml@main
285282 with :
286- builder : ${{ steps.buildx.outputs.name }}
287283 build-args : |
288284 BASE_IMAGE=quay.io/go-skynet/local-ai:${{ steps.meta.outputs.version }}
289285 MAKEFLAGS=${{ inputs.makeflags }}
290- context : .
291- file : ./Dockerfile.aio
292- platforms : ${{ inputs.platforms }}
286+ build-context : .
287+ build-file : ./Dockerfile.aio
288+ cache : true
289+ build-platforms : ${{ inputs.platforms }}
293290 push : ${{ github.event_name != 'pull_request' }}
294- tags : ${{ steps.meta_aio.outputs.tags }}
295- labels : ${{ steps.meta_aio.outputs.labels }}
291+ meta- tags : ${{ steps.meta_aio.outputs.tags }}
292+ meta- labels : ${{ steps.meta_aio.outputs.labels }}
296293
297294 - name : Build and push AIO image (dockerhub)
298295 if : inputs.aio != ''
299- uses : docker/build-push-action@v6
296+ # uses: docker/build-push-action@v6
297+ uses : crazy-max/.github/.github/workflows/build-distribute-mp.yml@main
300298 with :
301- builder : ${{ steps.buildx.outputs.name }}
302299 build-args : |
303300 BASE_IMAGE=localai/localai:${{ steps.meta.outputs.version }}
304301 MAKEFLAGS=${{ inputs.makeflags }}
305- context : .
306- file : ./Dockerfile.aio
307- platforms : ${{ inputs.platforms }}
302+ build-context : .
303+ build-file : ./Dockerfile.aio
304+ cache : true
305+ build-platforms : ${{ inputs.platforms }}
308306 push : ${{ github.event_name != 'pull_request' }}
309- tags : ${{ steps.meta_aio_dockerhub.outputs.tags }}
310- labels : ${{ steps.meta_aio_dockerhub.outputs.labels }}
307+ meta- tags : ${{ steps.meta_aio_dockerhub.outputs.tags }}
308+ meta- labels : ${{ steps.meta_aio_dockerhub.outputs.labels }}
311309
312310 - name : job summary
313311 run : |
0 commit comments