Some checks failed
Checks / Every dispatched command has a task name (push) Has been cancelled
Gitea Actions is enabled on the repo (1.23.8, has_actions true), and the guard
was run-on-demand until now — which is the same weakness it exists to fix: a
check nobody is obliged to run does not stop a regression landing.
.gitea/workflows rather than .github/workflows: Gitea reads the former first and
the only remote is Gitea.
The image is pinned to node:22-bookworm-slim rather than left to whatever the
runner's label maps to. The guard needs BOTH runtimes — node to run the real
formatter, python3 to drive it — and no stock runner image reliably has the
pair. That image ships node and no python3, so python3 is installed explicitly;
if the base image ever changes, that step fails visibly instead of the script's
shebang reporting a bare "not found".
No `paths` filter. The job is seconds once the image is cached, and a filter
narrow enough to be worth having is also narrow enough to miss the case it was
added for.
Verified by running the workflow's exact steps against a clean clone in that
image: it passes as committed, and injecting an unnamed command
(`libreportal app clone {appName}`) fails the job with the offending command
named and the file to edit.
Worth recording, since it nearly produced a wrong conclusion: scripts/dev is
export-ignore in .gitattributes, so `git archive` omits the guard entirely. A
first test built its fixture that way and the script appeared to be missing.
Checkout is a clone, not an archive, so CI does get it — the export-ignore only
keeps it out of release tarballs, which is what it is for.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
# Repo checks. Gitea Actions reads .gitea/workflows first, falling back to
|
|
# .github/workflows — this lives in the former because the only remote is Gitea.
|
|
#
|
|
# Deliberately not filtered by `paths`. The job is seconds of work once the image
|
|
# is pulled, and a filter narrow enough to be worth having is also narrow enough
|
|
# to miss the case it was added for.
|
|
name: Checks
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
task-names:
|
|
name: Every dispatched command has a task name
|
|
runs-on: ubuntu-latest
|
|
# Pinned image rather than relying on whatever the runner's label maps to:
|
|
# the guard needs BOTH node (to run the real formatter) and python3 (to drive
|
|
# it), and no single stock runner image reliably has the pair.
|
|
container: node:22-bookworm-slim
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# node:22-bookworm-slim ships node but no python3. Installed explicitly so
|
|
# a change in the base image surfaces here rather than as a confusing
|
|
# "not found" from the script's shebang.
|
|
- name: Install python3
|
|
run: |
|
|
apt-get update -qq
|
|
apt-get install -y --no-install-recommends python3
|
|
|
|
# Note this file is under scripts/dev, which .gitattributes marks
|
|
# export-ignore. That only affects `git archive` (release tarballs) — a
|
|
# checkout is a clone, so the guard is present here.
|
|
- name: Check task names
|
|
run: scripts/dev/lp-task-names
|