Repository navigation
chore: add governance, CI, and repo tooling for the org .github repo … #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| markdownlint: | |
| name: Markdown lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Lint Markdown | |
| uses: ./.github/actions/markdownlint | |
| links: | |
| name: Link check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check links | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| # Exclude perishdev self-links (org, repos, org Discussions, and | |
| # org search links may be private or not yet created during setup), | |
| # to avoid false failures. Mail links are skipped by lychee default. | |
| args: >- | |
| --no-progress | |
| --exclude 'perishdev' | |
| --accept 200,206,429 | |
| "**/*.md" | |
| fail: true | |
| yaml-syntax: | |
| name: YAML syntax | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install PyYAML | |
| run: python -m pip install --quiet pyyaml | |
| - name: Validate all YAML files parse | |
| shell: bash | |
| run: | | |
| python - <<'PY' | |
| import pathlib, sys, yaml | |
| failures = [] | |
| for path in sorted(pathlib.Path(".").rglob("*.y*ml")): | |
| if ".git" in path.parts: | |
| continue | |
| try: | |
| # Some YAML files (GitHub configs) contain multiple docs. | |
| list(yaml.safe_load_all(path.read_text())) | |
| except yaml.YAMLError as exc: | |
| failures.append(f"{path}: {exc}") | |
| if failures: | |
| print("Invalid YAML:\n" + "\n".join(failures)) | |
| sys.exit(1) | |
| print("All YAML files parsed successfully.") | |
| PY |