ci: Use cache from release image to build faster (#25829)

This should enable using unchanged layers from the `release` image, as a
cache, and build PR images faster. We only do this for images built for
PRs and not for direct `release` or `master` branches.
This commit is contained in:
Shrikant Sharat Kandula 2023-07-31 10:30:46 +05:30 committed by GitHub
parent a347b0801a
commit 0d69fb5472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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