Skip to content

Commit

Permalink
Adding gitspiegel-trigger workflow
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 authored Oct 25, 2023
1 parent 33a8d2f commit f33b3c5
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 f33b3c5

Please sign in to comment.