Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
Loading