validate-plugins.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: Validate Plugins
  2. on:
  3. pull_request:
  4. paths:
  5. - '.claude-plugin/**'
  6. - '*/.claude-plugin/**'
  7. - '*/agents/**'
  8. - '*/skills/**'
  9. - '*/commands/**'
  10. # `validate` is a required status check, so a PR that touches ONLY workflow
  11. # files (e.g. an action-SHA re-pin) would otherwise never trigger validate
  12. # and sit "Expected — Waiting for status to be reported" forever (workflow_dispatch
  13. # check runs aren't associated with the PR, so they don't satisfy it). Run
  14. # validate on workflow changes too so those PRs can clear the gate in-context.
  15. - '.github/workflows/**'
  16. # Same rationale for the scan policy prompt: a policy-only PR (.github/policy/**)
  17. # touches none of the plugin paths above, so validate would never trigger via
  18. # pull_request and the required check would sit "Expected" forever (a dispatch
  19. # check run isn't associated with the PR, so it can't satisfy the gate either).
  20. - '.github/policy/**'
  21. # And once more for a plugin's own docs: a PR that only edits a README or
  22. # adds a screenshot matches nothing above, so the required check never
  23. # reports and the PR can't be merged. Spelled out per level because `*`
  24. # doesn't cross a `/` — plugins live at plugins/<name>/, so `*/README.md`
  25. # would not match one.
  26. - 'plugins/*/README.md'
  27. - 'plugins/*/assets/**'
  28. - 'external_plugins/*/README.md'
  29. - 'external_plugins/*/assets/**'
  30. push:
  31. branches: [main]
  32. paths:
  33. - '.claude-plugin/**'
  34. # `validate` is a required status check on main. Bump PRs are opened with
  35. # GITHUB_TOKEN, which doesn't fire on:pull_request (recursion guard), so the
  36. # path-filtered trigger above never reports on them and the PR would be
  37. # blocked forever. The bump workflow dispatches this against each per-entry
  38. # bump branch instead; the check run lands on the branch HEAD (= PR head)
  39. # and satisfies the required check. The validate job runs unconditionally,
  40. # so a dispatch always reports.
  41. workflow_dispatch:
  42. permissions:
  43. contents: read
  44. jobs:
  45. validate:
  46. runs-on: ubuntu-latest
  47. steps:
  48. - uses: actions/checkout@v4
  49. with:
  50. fetch-depth: 0
  51. - uses: anthropics/claude-plugins-community/.github/actions/validate-plugins@426e469f322952061102b286b378c0c9733a0934
  52. with:
  53. marketplace-path: .claude-plugin/marketplace.json
  54. # Official curated marketplace: SHA-pin (I5) is a HARD error.
  55. # I8/I11 are warnings until the 15 known vendored-path/name issues
  56. # are cleaned up (see PR body); tighten to "I1 I3" after.
  57. warn-invariants: "I1 I3 I8 I11"
  58. claude-cli-version: latest