Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Adding gitspiegel-trigger workflow (#140)
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 d75b5a4 commit a7f2d0e
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 a7f2d0e

Please sign in to comment.