fix(runner-helper): build git target for all concrete platforms

What

Add platforms = common-platforms to the git bake target in dockerfiles/runner-helper/docker-bake.hcl.

Why

The git target had no platforms set, so buildx built it only for the native build platform (amd64) and reused that single output for every platform of the multi-platform concrete target, which consumes git via contexts = { git = "target:git" }.

As a result, the non-amd64 concrete runner-helper images (arm64, arm, s390x, ppc64le, riscv64) all shipped the amd64 git binary. On ARM64 runners this causes the job to fail immediately during source fetch:

ERROR: Job failed: step "concrete": exec: fetching sources: writing global git SSL config:
  setting git SSL config sslCAInfo: fork/exec /opt/gitlab-runner/git/bin/git: exec format error

exec format error = wrong-arch binary (amd64 git on an aarch64 machine).

Dockerfile.git is already fully arch-aware ($TARGETARCH/$TARGETVARIANT, git-lfs arch mapping, cross-compiled Go wrapper) — it just needs to be invoked per-arch. After this change, docker buildx bake --print git concrete confirms git resolves to the same 6 platforms as concrete, so each concrete arch is matched to its corresponding git build.

Evidence

Merge request reports

Loading