From 02e58355ccfa4c462372bfe039a63119d872f71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Senart?= Date: Mon, 19 Oct 2026 14:32:08 +0200 Subject: [PATCH] .github/workflows: validate JSON manifests --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b0a6910 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + with: + persist-credentials: false + - name: Validate JSON manifests + run: | + python3 - <<'PY' + import json + import subprocess + from pathlib import Path + + names = subprocess.check_output(["git", "ls-files", "-z", "--", "*.json"]) + for name in filter(None, names.split(b"\0")): + path = Path(name.decode("utf-8")) + if path.is_symlink() or not path.is_file(): + raise ValueError(f"manifest must be a regular file: {path}") + json.loads(path.read_text(encoding="utf-8")) + print(f"valid: {path}") + PY