diff --git a/.github/workflows/build-ruby.yml b/.github/workflows/build-ruby.yml index 30a21e6fcf..4bb1336eab 100644 --- a/.github/workflows/build-ruby.yml +++ b/.github/workflows/build-ruby.yml @@ -77,7 +77,7 @@ jobs: working-directory: .circleci/images/primary - name: Tag single-arch image (x86_64) run: | - docker buildx build . --builder=container --load --platform linux/x86_64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd + docker buildx build . --builder=container --cache-from=type=registry,ref=${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd --load --platform linux/x86_64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd working-directory: .circleci/images/primary - name: Test single-arch image (x86_64) run: | @@ -99,7 +99,7 @@ jobs: working-directory: .circleci/images/primary - name: Tag single-arch image (aarch64) run: | - docker buildx build . --builder=container --load --platform linux/aarch64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd + docker buildx build . --builder=container --cache-from=type=registry,ref=${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd --load --platform linux/aarch64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd working-directory: .circleci/images/primary - name: Test single-arch image (aarch64) run: | @@ -115,5 +115,5 @@ jobs: echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin - name: Build multi-arch image (x86_64, aarch64) run: | - docker buildx build . --builder=container --output=type=image,push=true --platform linux/x86_64,linux/aarch64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd + docker buildx build . --builder=container --cache-from=type=registry,ref=${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd --output=type=image,push=true --build-arg BUILDKIT_INLINE_CACHE=1 --platform linux/x86_64,linux/aarch64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd working-directory: .circleci/images/primary