bump-plugin-shas.yml 2.2 KB

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