Skip to content

Commit 3f3b679

Browse files
author
fk
committed
Trigger apt repo sync on release publish
1 parent aeb1327 commit 3f3b679

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Trigger APT Repo Sync
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
dispatch-sync:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger openfilebot-repo sync
12+
env:
13+
DISPATCH_TOKEN: ${{ secrets.APT_REPO_DISPATCH_TOKEN }}
14+
run: |
15+
[ -n "$DISPATCH_TOKEN" ] || { echo "Missing secret: APT_REPO_DISPATCH_TOKEN"; exit 1; }
16+
17+
curl -fsSL -X POST \
18+
-H "Accept: application/vnd.github+json" \
19+
-H "Authorization: Bearer $DISPATCH_TOKEN" \
20+
https://api.github.com/repos/masterxq/openfilebot-repo/dispatches \
21+
-d '{"event_type":"source_release_published","client_payload":{"source_repo":"masterxq/openfilebot","release_tag":"${{ github.event.release.tag_name }}","prerelease":"${{ github.event.release.prerelease }}"}}'

0 commit comments

Comments
 (0)