Skip to content

Commit

Permalink
T6415: Repo sync
Browse files Browse the repository at this point in the history
  • Loading branch information
sever-sever committed May 29, 2024
1 parent db4c7f1 commit b747fd4
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Repo-sync

on:
# push:
# branches:
# - current
pull_request:
types:
- closed
branches:
- current
workflow_dispatch:

jobs:
trigger-sync:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:

- name: Trigger sync workflow
shell: bash
env:
MY_REMOTE_REPO: ${{ secrets.REMOTE_REPO }}
MY_REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}
MY_PAT: ${{ secrets.PAT }}
run: |
curl -X POST \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: Bearer $MY_PAT" \
https://api.github.com/repos/$MY_REMOTE_OWNER/$MY_REMOTE_REPO/actions/workflows/vyos-repo-sync.yml/dispatches \
-d '{"ref":"git-actions"}'

0 comments on commit b747fd4

Please sign in to comment.