feat: add make and prettier so repo Makefile targets can run in CI #1

Closed
opened 2026-07-23 09:10:18 +00:00 by gravityfargo · 1 comment
Owner

Context

The python template ships a Makefile whose targets are the enforced local gate (make pre-commit = lint, format, typecheck, test). Any repo that wants CI to run one of those targets, rather than re-spelling the underlying command in YAML, currently cannot: the image has no make.

Concrete case in ModernLeft/agent-api-connectors. A step was added to check that generated CLI docs are current:

- name: Check generated CLI docs are current
  run: make docs-check

It failed on the first run that actually executed it:

/var/run/act/workflow/6.sh: line 2: make: command not found
exitcode 127: command not found

The step has since been removed (see acba171) and doc freshness is enforced only locally, because make pre-commit regenerates the docs before every commit. Restoring server-side enforcement needs the image to change.

Ask

Add to general-ci-image:

  1. make — so a workflow can invoke a repo Makefile target instead of duplicating the command in YAML. This is the general one: it benefits any repo, not just this case.
  2. prettier — narrower. The docs target runs prettier --write docs over generated Markdown, so without it the CI-side regeneration cannot reproduce the committed files byte for byte and the check fails spuriously. This one pulls in node, so it may not be worth it for a python image.

Alternatives considered

  • Inline the commands in YAML instead of calling make. Works for the typer generation, but the prettier pass is still required to reproduce committed output, so it does not avoid the second dependency.
  • Drop prettier from the docs pipeline. Rejected: the generated docs are deliberately formatted, and unformatted typer output is noticeably worse to read.
  • Use a second container for that one step. Possible, but a step-level image override for a formatting tool is a lot of machinery for one check.

Suggested split

make alone is cheap and generally useful, and could land independently. prettier is a bigger call given it means node in a python image, so it is reasonable to say no to that half and leave the docs check as a local-only gate.

## Context The python template ships a Makefile whose targets are the enforced local gate (`make pre-commit` = lint, format, typecheck, test). Any repo that wants CI to run one of those targets, rather than re-spelling the underlying command in YAML, currently cannot: the image has no `make`. Concrete case in ModernLeft/agent-api-connectors. A step was added to check that generated CLI docs are current: ```yaml - name: Check generated CLI docs are current run: make docs-check ``` It failed on the first run that actually executed it: ``` /var/run/act/workflow/6.sh: line 2: make: command not found exitcode 127: command not found ``` The step has since been removed (see acba171) and doc freshness is enforced only locally, because `make pre-commit` regenerates the docs before every commit. Restoring server-side enforcement needs the image to change. ## Ask Add to general-ci-image: 1. **`make`** — so a workflow can invoke a repo Makefile target instead of duplicating the command in YAML. This is the general one: it benefits any repo, not just this case. 2. **`prettier`** — narrower. The docs target runs `prettier --write docs` over generated Markdown, so without it the CI-side regeneration cannot reproduce the committed files byte for byte and the check fails spuriously. This one pulls in node, so it may not be worth it for a python image. ## Alternatives considered - **Inline the commands in YAML instead of calling make.** Works for the typer generation, but the prettier pass is still required to reproduce committed output, so it does not avoid the second dependency. - **Drop prettier from the docs pipeline.** Rejected: the generated docs are deliberately formatted, and unformatted typer output is noticeably worse to read. - **Use a second container for that one step.** Possible, but a step-level image override for a formatting tool is a lot of machinery for one check. ## Suggested split `make` alone is cheap and generally useful, and could land independently. `prettier` is a bigger call given it means node in a python image, so it is reasonable to say no to that half and leave the docs check as a local-only gate.
Author
Owner

Resolved differently to the ask, recording why.

make: no. The image supplies tools, not build orchestration. A workflow spells out the commands it needs rather than calling a consumer repo Makefile target. Noted in the Dockerfile, README and CLAUDE.md so it does not get added back later by someone reading this issue.

prettier: yes, pinned to 3.8.1 and installed globally so the non-root appuser can run it. Verified in a local build: docker run --rm general-ci:local prettier --version prints 3.8.1, and make is confirmed absent.

Correction to the original report. I wrote that prettier pulls in node, so it may not be worth it for a python image. That was wrong: the base is node:24-slim and node is mandatory anyway, because the Forgejo runner executes JS actions with the job container node. Adding prettier costs one npm package, not a runtime.

Consequence for the case that prompted this. ModernLeft/agent-api-connectors wanted make docs-check in CI. That specific step stays impossible, but the underlying check does not: with prettier in the image the workflow can inline the typer generation, the unescape pass, the prettier pass and the git diff --exit-code, which is what it should have done in the first place. I will restore it there once a version carrying prettier is published.

Resolved differently to the ask, recording why. **`make`: no.** The image supplies tools, not build orchestration. A workflow spells out the commands it needs rather than calling a consumer repo Makefile target. Noted in the Dockerfile, README and CLAUDE.md so it does not get added back later by someone reading this issue. **`prettier`: yes**, pinned to 3.8.1 and installed globally so the non-root `appuser` can run it. Verified in a local build: `docker run --rm general-ci:local prettier --version` prints 3.8.1, and `make` is confirmed absent. **Correction to the original report.** I wrote that prettier *pulls in node, so it may not be worth it for a python image*. That was wrong: the base is `node:24-slim` and node is mandatory anyway, because the Forgejo runner executes JS actions with the job container node. Adding prettier costs one npm package, not a runtime. **Consequence for the case that prompted this.** ModernLeft/agent-api-connectors wanted `make docs-check` in CI. That specific step stays impossible, but the underlying check does not: with prettier in the image the workflow can inline the typer generation, the unescape pass, the prettier pass and the `git diff --exit-code`, which is what it should have done in the first place. I will restore it there once a version carrying prettier is published.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ModernLeft/general-ci-image#1
No description provided.