diff options
Diffstat (limited to '.github')
-rwxr-xr-x | .github/scripts/build-base-image.sh | 4 | ||||
-rw-r--r-- | .github/workflows/update-base.yaml | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/.github/scripts/build-base-image.sh b/.github/scripts/build-base-image.sh index a064813e73..7832df2754 100755 --- a/.github/scripts/build-base-image.sh +++ b/.github/scripts/build-base-image.sh @@ -2,7 +2,6 @@ if [ -z "${BASE_TAG}" ]; then BASE_TAG=$(grep "ARG BASE=" ".github/dockerfiles/Dockerfile.${1}" | head -1 | tr '=' ' ' | awk '{print $3}') - BASE_CACHE="--cache-from ${BASE_TAG}" fi case "${BASE_TAG}" in @@ -31,8 +30,9 @@ elif [ -f "otp_docker_base/otp_docker_base.tar" ]; then docker load -i "otp_docker_base/otp_docker_base.tar" echo "::set-output name=BASE_BUILD::loaded" else - if [ -n "${BASE_CACHE}" ]; then + if [ "${BASE_USE_CACHE}" != "false" ]; then docker pull "${BASE_TAG}" + BASE_CACHE="--cache-from ${BASE_TAG}" fi BASE_IMAGE_ID=$(docker images -q "${BASE_TAG}") diff --git a/.github/workflows/update-base.yaml b/.github/workflows/update-base.yaml index ccfbebd898..7e3ec2bc89 100644 --- a/.github/workflows/update-base.yaml +++ b/.github/workflows/update-base.yaml @@ -31,6 +31,7 @@ jobs: id: base run: >- BASE_TAG=docker.pkg.github.com/erlang/otp/${{ matrix.type }} + BASE_USE_CACHE=false .github/scripts/build-base-image.sh - name: Push base image run: docker push ${{ steps.base.outputs.BASE_TAG }} |