Skip to content

Commit 15852c4

Browse files
committed
auto release compile userscripts
1 parent cb71131 commit 15852c4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/trigger.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Trigger Target Repo
2+
on:
3+
push:
4+
branches: [main]
5+
paths:
6+
- "**.user.js" # Chỉ trigger khi có thay đổi ở file .user.js
7+
jobs:
8+
trigger:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger workflow
12+
run: |
13+
curl -X POST \
14+
-H "Accept: application/vnd.github.v3+json" \
15+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
16+
https://api.github.com/repos/${{ github.repository_owner }}/compiledUserscripts/dispatches \
17+
-d '{
18+
"event_type": "source_push",
19+
"client_payload": {
20+
"repository": "${{ github.repository }}",
21+
"sha": "${{ github.sha }}"
22+
}
23+
}'

0 commit comments

Comments
 (0)