name: Template Compliance

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  compliance:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Required files
        run: |
          test -f AGENTS.md
          test -f .codex/project.md
          test -f README.md
          test -f SECURITY.md
          test -f CHANGELOG.md
          test -f .gitignore

      - name: Placeholder scan
        run: |
          ! grep -RInE "[P]ROJECT_NAME|[P]ROJECT_DESCRIPTION|[R]EPOSITORY_OWNER|[R]EPOSITORY_NAME|[P]ACKAGE_NAME|[A]RTIFACT_NAME|[A]RTIFACT_OUTPUT_DIRECTORY" -- AGENTS.md .codex README.md docs .gitea || exit 1

      - name: README divider
        run: grep -q "rainbow.png" README.md
