diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 3567c9456a..0eb08e8b35 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -77,7 +77,11 @@ jobs: if: steps.run_result.outputs.run_result != 'success' working-directory: "." run: | - docker build -t cicontainer . + declare -a args + if [[ "${{ inputs.pr }}" != 0 ]]; then + args+=(--cache-from "${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-${{ vars.EDITION }}:release") + fi + docker build -t cicontainer "${args[@]}" . # Saving the docker image to tar file - name: Save Docker image to tar file