A workflow tests a library with a matrix on ubuntu-latest, windows-latest and macos-latest. One step uses the team's own lint action, whose action.yml has runs.using: docker. The Ubuntu jobs pass, but the lint step fails on the Windows and macOS jobs. Linting must keep running on all three systems with the least ongoing effort. What should the team do?
Choose one.
Docker container actions are supported only on Linux runners; JavaScript and composite actions run on all three operating systems.
The failure is a platform limit, not a configuration error: a container action cannot run on Windows or macOS runners. Installing Docker does not lift that limit, and calling docker run from a composite step fails too because macOS hosted runners have no Docker engine and Windows runners use Windows containers. Skipping the step on non-Linux jobs removes coverage the team needs. Rewriting the logic as a JavaScript action is the one change that runs everywhere without extra per-run setup.
- Note the action type from runs.using: docker.
- Recall that container actions run only on Linux runners.
- Check whether Docker is even usable on hosted Windows and macOS runners for a Linux image.
- Reject the option that drops linting on two systems.
- Choose a JavaScript rewrite.
Exam tip: Need an action on Windows or macOS? It must be JavaScript or composite, never a container action.
Create Custom GitHub Actions: JavaScript, Docker and Composite Actions (GH-200) — the lesson that teaches this.