GitHub Actions Docker Action "image platform does not match host"
A Docker container action fails because its image was built for an architecture that does not match the runner, or because Docker actions only run on Linux runners.
What this error means
The step fails during "Build/Pull container action" with a platform-mismatch warning or an exec format error, or with "Container action is only supported on Linux". The action never executes.
WARNING: The requested image's platform (linux/arm64) does not match the
detected host platform (linux/amd64)
exec /entrypoint.sh: exec format errorCommon causes
Image architecture differs from the runner
A Docker action image built only for arm64 fails on an amd64 runner (and vice versa). The platform-mismatch warning precedes an exec format error when the binary cannot run.
Docker action on a non-Linux runner
Container actions (runs.using: docker) run only on Linux runners. Scheduling one on Windows or macOS fails before the container starts.
How to fix it
Run Docker actions on a matching Linux runner
Schedule the job on a Linux runner whose architecture matches the action image.
jobs:
scan:
runs-on: ubuntu-latest # Linux required for docker actions
steps:
- uses: my-org/scanner-action@v1Publish a multi-arch action image
- Build the action image for both linux/amd64 and linux/arm64 with buildx.
- Push it as a multi-arch manifest so the runner pulls the matching variant.
- For arm64 runners, confirm the action ships an arm64 image.
How to prevent it
- Publish Docker action images as multi-arch manifests.
- Keep Docker (container) actions on Linux runners.
- Match runner architecture to the action image when using single-arch images.