chore: Update Docker build workflow for reliability improvements (#6760)

* fix: Update Docker build workflow to use Wandalen/wretry.action for improved reliability

* fix: Remove attempt limit and delay from Docker build workflow

* fix: Add comment to clarify provenance setting in Docker build workflow
This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-02-21 15:33:50 -03:00 • committed by GitHub
commit d545e8d302
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -205,15 +205,17 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push to Docker Hub - name: Build and Push to Docker Hub
uses: docker/build-push-action@v6 uses: Wandalen/wretry.action@master
with: with:
context: . action: docker/build-push-action@v6
push: true with: |
file: ${{ needs.setup.outputs.file }} context: .
tags: ${{ needs.setup.outputs.docker_tags }} push: true
platforms: linux/amd64,linux/arm64 file: ${{ needs.setup.outputs.file }}
cache-from: type=gha tags: ${{ needs.setup.outputs.docker_tags }}
cache-to: type=gha,mode=max platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Login to Github Container Registry - name: Login to Github Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@ -223,15 +225,17 @@ jobs:
password: ${{ secrets.TEMP_GHCR_TOKEN}} password: ${{ secrets.TEMP_GHCR_TOKEN}}
- name: Build and push to Github Container Registry - name: Build and push to Github Container Registry
uses: docker/build-push-action@v6 uses: Wandalen/wretry.action@master
with: with:
context: . action: docker/build-push-action@v6
push: true with: |
file: ${{ needs.setup.outputs.file }} context: .
tags: ${{ needs.setup.outputs.ghcr_tags }} push: true
platforms: linux/amd64,linux/arm64 file: ${{ needs.setup.outputs.file }}
cache-from: type=gha tags: ${{ needs.setup.outputs.ghcr_tags }}
cache-to: type=gha,mode=max platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
build_components: build_components:
if: ${{ inputs.release_type == 'main' }} if: ${{ inputs.release_type == 'main' }}
@ -287,16 +291,18 @@ jobs:
run: sleep 120 run: sleep 120
- name: Build and push ${{ matrix.component }} - name: Build and push ${{ matrix.component }}
uses: docker/build-push-action@v6 uses: Wandalen/wretry.action@master
with: with:
context: . action: docker/build-push-action@v6
push: true with: |
build-args: | context: .
LANGFLOW_IMAGE=${{ matrix.langflow_image }} push: true
file: ${{ matrix.dockerfile }} build-args: |
tags: ${{ matrix.tags }} LANGFLOW_IMAGE=${{ matrix.langflow_image }}
# provenance: false will result in a single manifest for all platforms which makes the image pullable from arm64 machines via the emulation (e.g. Apple Silicon machines) file: ${{ matrix.dockerfile }}
provenance: false tags: ${{ matrix.tags }}
# provenance: false will result in a single manifest for all platforms which makes the image pullable from arm64 machines via the emulation (e.g. Apple Silicon machines)
provenance: false
restart-space: restart-space:
name: Restart HuggingFace Spaces name: Restart HuggingFace Spaces