forgejo-mcp/.tekton/tasks/openspec-validate.yaml
Christoph Görn cb6f657644
ci: 🚀 enforce check-demos in PaC and pre-commit
Run the anchored-demo checker automatically instead of relying on
authors to invoke `just check-demos` by hand.

- rewrite checker in POSIX sh (no bashisms) so one script serves local
  shells, the pre-commit hook, and the minimal release-tools CI image;
  shellcheck-clean, verified under sh
- .tekton/tasks/openspec-validate.yaml: add a check-demos step to the
  existing openspec-validate task (same image/workspace/trigger)
- .tekton/openspec-validate-{pr,push}.yaml: also fire when the checker
  script changes
- .pre-commit-config.yaml: local check-demos hook, scoped to
  openspec spec/demo files and the script itself
2026-06-02 00:16:07 +02:00

33 lines
1 KiB
YAML

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: openspec-validate
annotations:
tekton.dev/displayName: "openspec validate --all --strict + check anchored demos"
spec:
params:
- name: RELEASE_TOOLS_IMAGE
description: |
Pre-built release-tools image containing openspec (and other tools).
type: string
default: codeberg.org/operate-first/release-tools:latest
workspaces:
- name: source
mountPath: /workspace/src
steps:
- name: validate
image: $(params.RELEASE_TOOLS_IMAGE)
workingDir: $(workspaces.source.path)
script: |
#!/bin/sh
set -eu
openspec validate --all --strict --no-interactive
- name: check-demos
image: $(params.RELEASE_TOOLS_IMAGE)
workingDir: $(workspaces.source.path)
script: |
#!/bin/sh
set -eu
# Validate anchored Showboat demos against their specs.
# POSIX sh; no extra tooling beyond coreutils + git.
./scripts/ci/check-spec-demo-anchors.sh