bump-plugin-shas.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: Bump Plugin SHAs
  2. # Weekly sweep: for each external entry whose upstream HEAD has moved past
  3. # its pinned SHA, validate at the new SHA with `claude plugin validate`
  4. # inline, then open one PR with all passing bumps.
  5. #
  6. # Bot-free — uses the default GITHUB_TOKEN. PRs opened with GITHUB_TOKEN don't
  7. # trigger on:pull_request workflows, so the policy scan (`Scan Plugins`, a
  8. # required status check on main) would never run and the bump PR could never
  9. # merge. workflow_dispatch is exempt from that recursion guard, so we dispatch
  10. # the scan ourselves on the bump branch after the PR is opened. The check run
  11. # lands on the branch HEAD — the same SHA as the PR head — and satisfies the
  12. # required check.
  13. on:
  14. schedule:
  15. - cron: '23 7 * * 1' # Monday 07:23 UTC
  16. workflow_dispatch:
  17. inputs:
  18. max_bumps:
  19. description: Cap on plugins bumped this run
  20. required: false
  21. default: '20'
  22. permissions:
  23. contents: write
  24. pull-requests: write
  25. actions: write # gh workflow run scan-plugins.yml on the bump branch
  26. concurrency:
  27. group: bump-plugin-shas
  28. jobs:
  29. bump:
  30. runs-on: ubuntu-latest
  31. steps:
  32. - uses: actions/checkout@v4
  33. # createCommitOnBranch-based bump so commits are signed by GitHub and
  34. # satisfy the org-level required_signatures ruleset on main.
  35. - uses: anthropics/claude-plugins-community/.github/actions/bump-plugin-shas@c41c6911de0afffd2bc5cd8b21fb1e06444ee13b
  36. id: bump
  37. with:
  38. marketplace-path: .claude-plugin/marketplace.json
  39. max-bumps: ${{ inputs.max_bumps || '20' }}
  40. claude-cli-version: latest
  41. # `bump/plugin-shas` is the action's default `pr-branch`. The scan diffs
  42. # the branch against origin/main (the action's base-ref fallback when
  43. # there's no pull_request event) and scans only the bumped entries.
  44. - name: Dispatch policy scan on bump branch
  45. if: steps.bump.outputs.pr-url != ''
  46. env:
  47. GH_TOKEN: ${{ github.token }}
  48. run: gh workflow run scan-plugins.yml --ref bump/plugin-shas