ci: Fix caching for PR CI runs

This commit is contained in:
Shrikant Sharat Kandula 2023-10-06 15:48:07 +05:30 committed by GitHub
parent 8a35e05923
commit 517f7a8eba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,9 +83,12 @@ jobs:
if: steps.run_result.outputs.run_result != 'success'
working-directory: "."
run: |
set -o xtrace
declare -a args
if [[ "${{ inputs.pr }}" != 0 ]]; then
args+=(--cache-from "${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-${{ vars.EDITION }}:release")
cache_image="${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-${{ vars.EDITION }}:release"
args+=(--cache-from "$cache_image")
docker pull "$cache_image"
fi
if [[ "${{ inputs.pr }}" != 0 || "${{ github.ref_name }}" != master ]]; then
args+=(--build-arg "APPSMITH_CLOUD_SERVICES_BASE_URL=https://release-cs.appsmith.com")