Repository: moby/moby (language: go)

Issue:
ci: fix bin-image workflow
**- What I did**

Related to https://github.com/moby/moby/actions/runs/5014814026/jobs/8989563591#step:6:13158

```
#147 3.762 Building static /tmp/bundles/binary-daemon/dockerd (linux/arm/v6)...
#147 798.5 # github.com/docker/docker/cmd/dockerd
#147 798.5 /usr/local/go/pkg/tool/linux_amd64/link: running arm-linux-gnueabi-clang failed: exit status 1
#147 798.5 ld.lld: error: failed to open $WORK/b001/exe/a.out: No space left on device
#147 798.5 clang: error: linker command failed with exit code 1 (use -v to see invocation)
#147 798.5 
```

It seems public runner specs have changed recently with lower available disk space.

**- How I did it**

In the meantime let's just remove the android sdk, hosted tool cache and dotnet we don't need for this workflow to fix this issue. Will open a follow-up to implement build distribution for each platform on a dedicated runner. The pipeline will also be faster.

**- How to verify it**

**- Description for the changelog**
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->


**- A picture of a cute animal (not mandatory but encouraged)**




Discussion / hints:

Fix patch:
diff --git a/.github/workflows/bin-image.yml b/.github/workflows/bin-image.yml
index f8992042cf216..9a7e3790327ad 100644
--- a/.github/workflows/bin-image.yml
+++ b/.github/workflows/bin-image.yml
@@ -24,16 +24,19 @@ jobs:
   validate-dco:
     uses: ./.github/workflows/.dco.yml
 
-  build:
+  prepare:
     runs-on: ubuntu-20.04
-    needs:
-      - validate-dco
+    outputs:
+      platforms: ${{ steps.platforms.outputs.matrix }}
     steps:
       -
         name: Checkout
         uses: actions/checkout@v3
-        with:
-          fetch-depth: 0
+      -
+        name: Create platforms matrix
+        id: platforms
+        run: |
+          echo "matrix=$(docker buildx bake bin-image-cross --print | jq -cr '.target."bin-image-cross".platforms')" >>${GITHUB_OUTPUT}
       -
         name: Docker meta
         id: meta
@@ -54,6 +57,40 @@ jobs:
             type=semver,pattern={{version}}
             type=ref,event=branch
             type=ref,event=pr
+      -
+        name: Rename meta bake definition file
+        run: |
+          mv "${{ steps.meta.outputs.bake-file }}" "/tmp/bake-meta.json"
+      -
+        name: Upload meta bake definition
+        uses: actions/upload-artifact@v3
+        with:
+          name: bake-meta
+          path: /tmp/bake-meta.json
+          if-no-files-found: error
+          retention-days: 1
+
+  build:
+    runs-on: ubuntu-20.04
+    needs:
+      - validate-dco
+      - prepare
+    strategy:
+      fail-fast: false
+      matrix:
+        platform: ${{ fromJson(needs.prepare.outputs.platforms) }}
+    steps:
+      -
+        name: Checkout
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+      -
+        name: Download meta bake definition
+        uses: actions/download-artifact@v3
+        with:
+          name: bake-meta
+          path: /tmp
       -
         name: Set up QEMU
         uses: docker/setup-qemu-action@v2
@@ -66,7 +103,8 @@ jobs:
         with:
           files: |
             ./docker-bake.hcl
-            ${{ steps.meta.outputs.bake-file }}
-          targets: bin-image-cross
+            /tmp/bake-meta.json
+          targets: bin-image
           set: |
+            *.platform=${{ matrix.platform }}
             *.output=type=cacheonly


Test patch: