File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 if : ${{ inputs.environment == 'staging' }}
3333 run : docker login -u '${{ secrets.DOCKER_USERNAME_STAGING }}' -p '${{ secrets.DOCKER_PASSWORD_STAGING }}' registry.anvil.rcac.purdue.edu
3434
35+ # This step is necessary because our script uses the destination OCI registry as a layer cache, which isn't supported by Docker out of the box.
36+ # See https://docs.docker.com/build/cache/backends/registry/ and https://docs.docker.com/build/builders/drivers/ for more info.
37+ - name : Set up buildx builder
38+ run : |
39+ docker buildx create --use
40+ docker buildx inspect --bootstrap
41+
3542 - name : Release
3643 run : ./.github/workflows/scripts/release-${{ inputs.environment }}.sh "${{ inputs.version }}"
3744 env :
Original file line number Diff line number Diff line change @@ -51,13 +51,13 @@ build_and_push() {
5151
5252 IIDFILE=$( mktemp)
5353
54- docker build \
54+ docker buildx build \
5555 --push \
5656 -f " $DOCKERFILE " \
5757 --iidfile " $IIDFILE " \
5858 -t " $IMAGE_TAG " \
5959 --cache-from=" type=registry,ref=$CACHE_TAG " \
60- --cache-to=" type=registry,ref=$CACHE_TAG " \
60+ --cache-to=" type=registry,ref=$CACHE_TAG ,mode=max " \
6161 " $BUILD_CONTEXT "
6262
6363 IMAGE_ID=$( cat " $IIDFILE " ) # looks like "sha256:32975dcafd44d8c6f921d2276e2a39f42f268e8c9584d6c4d4c88f5a073b7b1d"
You can’t perform that action at this time.
0 commit comments