From d545e8d302e8e241c3bf39aa7248b7eb958c8ad5 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 21 Feb 2025 15:33:50 -0300 Subject: [PATCH] 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 --- .github/workflows/docker-build.yml | 56 +++++++++++++++++------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 009ce94c8..956558508 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -205,15 +205,17 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and Push to Docker Hub - uses: docker/build-push-action@v6 + uses: Wandalen/wretry.action@master with: - context: . - push: true - file: ${{ needs.setup.outputs.file }} - tags: ${{ needs.setup.outputs.docker_tags }} - platforms: linux/amd64,linux/arm64 - cache-from: type=gha - cache-to: type=gha,mode=max + action: docker/build-push-action@v6 + with: | + context: . + push: true + file: ${{ needs.setup.outputs.file }} + tags: ${{ needs.setup.outputs.docker_tags }} + platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max - name: Login to Github Container Registry uses: docker/login-action@v3 @@ -223,15 +225,17 @@ jobs: password: ${{ secrets.TEMP_GHCR_TOKEN}} - name: Build and push to Github Container Registry - uses: docker/build-push-action@v6 + uses: Wandalen/wretry.action@master with: - context: . - push: true - file: ${{ needs.setup.outputs.file }} - tags: ${{ needs.setup.outputs.ghcr_tags }} - platforms: linux/amd64,linux/arm64 - cache-from: type=gha - cache-to: type=gha,mode=max + action: docker/build-push-action@v6 + with: | + context: . + push: true + file: ${{ needs.setup.outputs.file }} + tags: ${{ needs.setup.outputs.ghcr_tags }} + platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max build_components: if: ${{ inputs.release_type == 'main' }} @@ -287,16 +291,18 @@ jobs: run: sleep 120 - name: Build and push ${{ matrix.component }} - uses: docker/build-push-action@v6 + uses: Wandalen/wretry.action@master with: - context: . - push: true - build-args: | - LANGFLOW_IMAGE=${{ matrix.langflow_image }} - file: ${{ matrix.dockerfile }} - 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 + action: docker/build-push-action@v6 + with: | + context: . + push: true + build-args: | + LANGFLOW_IMAGE=${{ matrix.langflow_image }} + file: ${{ matrix.dockerfile }} + 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: name: Restart HuggingFace Spaces