diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 94e22aa0..65ed21ae 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -126,6 +126,20 @@ jobs: mix assets.setup && \ mix compile --warnings-as-errors' + - name: Build CI test image locally + run: | + set -euo pipefail + # Build the CI image from the current Dockerfile.ci. Use the + # registry image for layer caching so repeated builds are fast. + # The build-ci-image pre-req job keeps the cache warm. + CI_IMAGE="${REGISTRY}/${OWNER}/${CI_IMAGE_NAME}" + DOCKER_BUILDKIT=1 docker build \ + --file Dockerfile.ci \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ + --cache-from "${CI_IMAGE}:latest" \ + --tag prop-ci:local \ + . + - name: Run tests run: | set -euo pipefail @@ -137,7 +151,7 @@ jobs: -e MIX_ENV=test \ --network host \ -w /app \ - git.mcintire.me/graham/prop-ci:latest \ + prop-ci:local \ sh -euc '\ mkdir -p /app && cd /app && tar xf - && \ mix deps.get && \