Skip to content

Commit

Permalink
Adding gitspiegel-trigger workflow (#682)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mutantcornholio committed Oct 26, 2023
1 parent 38af3c9 commit dc9550b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/gitspiegel-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: gitspiegel sync

on:
pull_request:
types:
- opened
- synchronize
- unlocked
- ready_for_review
- reopened

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Trigger sync via API
run: |
curl --fail-with-body -XPOST "https://gitspiegel.parity-prod.parity.io/api/v1/mirror/${{ github.repository }}/pull/${{ github.event.number }}" \
-H "Content-Type: application/json" \
-H "x-auth: ${{ secrets.GITSPIEGEL_TOKEN }}"

0 comments on commit dc9550b

Please sign in to comment.