Skip to content

Commit dc9550b

Browse files
Adding gitspiegel-trigger workflow (#682)
Using a workflow to trigger mirroring instead of a webhook allows us to reuse "Approving workflow runs from public forks" GitHub feature to somewhat protect us from malicious PRs
1 parent 38af3c9 commit dc9550b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Diff for: .github/workflows/gitspiegel-trigger.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: gitspiegel sync
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- unlocked
9+
- ready_for_review
10+
- reopened
11+
12+
jobs:
13+
sync:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Trigger sync via API
17+
run: |
18+
curl --fail-with-body -XPOST "https://gitspiegel.parity-prod.parity.io/api/v1/mirror/${{ github.repository }}/pull/${{ github.event.number }}" \
19+
-H "Content-Type: application/json" \
20+
-H "x-auth: ${{ secrets.GITSPIEGEL_TOKEN }}"

0 commit comments

Comments
 (0)