Skip to content

Commit 054327b

Browse files
hsbtclaude
andcommitted
Use repository_dispatch API instead of workflow_dispatch for build trigger
The PAT lacks actions:write permission needed for `gh workflow run`. Switch to the repository_dispatch API which only requires contents:write, a permission the token already has for git push. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6b639fc commit 054327b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ jobs:
2828
GITHUB_TOKEN: ${{ secrets.MATZBOT_AUTO_UPDATE_TOKEN }}
2929
- name: dispatch build
3030
if: steps.commit.outputs.updated == 'true'
31-
run: gh workflow run build.yml
31+
run: gh api repos/${{ github.repository }}/dispatches -f event_type=build
3232
env:
3333
GH_TOKEN: ${{ secrets.MATZBOT_AUTO_UPDATE_TOKEN }}

0 commit comments

Comments
 (0)