From 36aa391e59b80fdb78894f7a2012a69a55fa68f3eb8aeb8fbf212871879ce724 Mon Sep 17 00:00:00 2001 From: CTO Agent Date: Sun, 25 Oct 2026 15:41:18 +0000 Subject: [PATCH] ci: POSIX-safe example-validation loop (trixie-slim sh is dash, no shopt) --- .forgejo/workflows/validate.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/validate.yml b/.forgejo/workflows/validate.yml index 5968dc5..5c8b474 100644 --- a/.forgejo/workflows/validate.yml +++ b/.forgejo/workflows/validate.yml @@ -60,13 +60,12 @@ jobs: - name: Validate example payloads against their schemas (if any) working-directory: ${{ github.workspace }} run: | - set -euo pipefail + set -eu export NODE_PATH=/tmp/ajv/node_modules - shopt -s nullglob - for schema in $(find schemas -type f -name '*.json'); do + find schemas -type f -name 'v*.json' -print | while IFS= read -r schema; do dir="$(dirname "$schema")/examples" [ -d "$dir" ] || continue - for example in "$dir"/*.json; do + find "$dir" -type f -name '*.json' -print | while IFS= read -r example; do echo "--- validate example $example against $schema" node /tmp/ajv/node_modules/.bin/ajv validate --spec=draft2020 -c=ajv-formats -s "$schema" -d "$example" done