From 4ad4914bd15bd856eddb306d86588bdacabb1184 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 18 Aug 2023 17:05:25 +0100 Subject: [PATCH] ci, gha: Add `retry_builder` Docker image builder This change is aimed at significantly reducing the frequency of failures caused by intermittent network timeouts. --- .github/actions/run-in-docker-action/action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/actions/run-in-docker-action/action.yml b/.github/actions/run-in-docker-action/action.yml index 203383d0b1..97582df2f7 100644 --- a/.github/actions/run-in-docker-action/action.yml +++ b/.github/actions/run-in-docker-action/action.yml @@ -20,6 +20,18 @@ runs: network=host - uses: docker/build-push-action@v4 + id: main_builder + continue-on-error: true + with: + context: . + file: ${{ inputs.dockerfile }} + tags: ${{ inputs.tag }} + load: true + cache-from: type=gha + + - uses: docker/build-push-action@v4 + id: retry_builder + if: steps.main_builder.outcome == 'failure' with: context: . file: ${{ inputs.dockerfile }}