validate-plugins.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. push:
  22. branches: [main]
  23. paths:
  24. - '.claude-plugin/**'
  25. # `validate` is a required status check on main. Bump PRs are opened with
  26. # GITHUB_TOKEN, which doesn't fire on:pull_request (recursion guard), so the
  27. # path-filtered trigger above never reports on them and the PR would be
  28. # blocked forever. The bump workflow dispatches this against each per-entry
  29. # bump branch instead; the check run lands on the branch HEAD (= PR head)
  30. # and satisfies the required check. The validate job runs unconditionally,
  31. # so a dispatch always reports.
  32. workflow_dispatch:
  33. permissions:
  34. contents: read
  35. jobs:
  36. validate:
  37. runs-on: ubuntu-latest
  38. steps:
  39. - uses: actions/checkout@v4
  40. with:
  41. fetch-depth: 0
  42. - uses: anthropics/claude-plugins-community/.github/actions/validate-plugins@426e469f322952061102b286b378c0c9733a0934
  43. with:
  44. marketplace-path: .claude-plugin/marketplace.json
  45. # Official curated marketplace: SHA-pin (I5) is a HARD error.
  46. # I8/I11 are warnings until the 15 known vendored-path/name issues
  47. # are cleaned up (see PR body); tighten to "I1 I3" after.
  48. warn-invariants: "I1 I3 I8 I11"
  49. claude-cli-version: latest