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:
parent
a347b0801a
commit
0d69fb5472
6
.github/workflows/build-docker-image.yml
vendored
6
.github/workflows/build-docker-image.yml
vendored
|
|
@ -77,7 +77,11 @@ jobs:
|
||||||
if: steps.run_result.outputs.run_result != 'success'
|
if: steps.run_result.outputs.run_result != 'success'
|
||||||
working-directory: "."
|
working-directory: "."
|
||||||
run: |
|
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
|
# Saving the docker image to tar file
|
||||||
- name: Save Docker image to tar file
|
- name: Save Docker image to tar file
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user