# GitHub Actions setup-buildx "driver-opts invalid"

> Fix the GitHub Actions docker/setup-buildx-action error caused by invalid driver-opts input.

Source: https://latchkey.dev/learn/github-actions/github-actions-setup-buildx-driver-opts-invalid  
Updated: 2026-06-26

setup-buildx-action validates driver and driver-opts. Passing an option that the selected driver does not support, or malformed key=value pairs, fails builder initialization. This is a configuration error.

## Diagnose it: is the job queued, or is the runner gone?

A job that never starts and a job whose runner disappeared mid-run look similar in the UI and have opposite causes. The first is a labelling or capacity problem, the second is the runner being killed, usually by memory pressure or a spot reclaim.

```.github/workflows/ci.yml
- name: Runner facts
  run: |
    echo "runner name: $RUNNER_NAME"
    echo "os/arch:     $RUNNER_OS/$RUNNER_ARCH"
    nproc; free -h; df -h /
    echo "labels this job asked for: ${{ toJSON(job) }}"
```

> If the job sits in `queued` and never picks up, no runner matches every label you listed. Labels are ANDed: `runs-on: [self-hosted, linux, gpu]` needs one runner carrying all three, not three runners carrying one each.

## The failures that are not your workflow

- Exit 137 is the kernel out-of-memory killer, not an application error. Check `free -h` above against your peak usage.
- Disk exhaustion presents as unrelated write errors deep in a build. GitHub-hosted runners ship roughly 14 GB of free space, which a Docker-heavy job can exhaust.
- A lost connection to the server on a self-hosted runner is usually the host being reclaimed or rebooted, not a network fault in your job.
- A job that starts and immediately fails with no step output normally failed during runner setup, before your workflow ran at all.

## FAQ

### What causes GitHub Actions setup-buildx "driver-opts invalid"?

There are 2 common causes: option not valid for the chosen driver and malformed key=value list. A driver-opt like network or image is set on a driver that does not accept it (e.g.

### How do I fix GitHub Actions setup-buildx "driver-opts invalid"?

Use valid options for the driver. Select the docker-container driver when you need image/network driver-opts.

### What does GitHub Actions setup-buildx "driver-opts invalid" actually mean?

The setup-buildx step fails creating the builder, complaining about an unrecognized or malformed driver option.

### How do I stop GitHub Actions setup-buildx "driver-opts invalid" happening again?

Match driver-opts to the capabilities of the selected buildx driver. The prevention section lists 2 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
